From c5e31f2be392923db0bd757a33275581dcdcab89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Tue, 13 May 2025 10:40:21 +0100 Subject: [PATCH 1/2] `nimbledeps` is added to `.gitignore` when `setup`. Fixes #1374 (#1393) --- src/nimble.nim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nimble.nim b/src/nimble.nim index f1ec38d7..62c24d20 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -24,6 +24,7 @@ import nimblepkg/packageinfotypes, nimblepkg/packageinfo, nimblepkg/version, const nimblePathsFileName* = "nimble.paths" nimbleConfigFileName* = "config.nims" + nimbledepsFolderName = "nimbledeps" gitIgnoreFileName = ".gitignore" hgIgnoreFileName = ".hgignore" nimblePathsEnv = "__NIMBLE_PATHS" @@ -2344,9 +2345,13 @@ proc setupVcsIgnoreFile = if not fileContent.contains(nimblePathsFileName): fileContent.append(nimblePathsFileName) writeFile = true + if not fileContent.contains(nimbledepsFolderName): + fileContent.append(nimbledepsFolderName) + writeFile = true else: fileContent.append(developFileName) fileContent.append(nimblePathsFileName) + fileContent.append(nimbledepsFolderName) writeFile = true if writeFile: From a03231da844151fd8ff7092709778e70765340da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Tue, 13 May 2025 10:40:34 +0100 Subject: [PATCH 2/2] Fixes #1386 "nimble has problems when "requires" refers to mercurial repository" (#1394) --- src/nimblepkg/download.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nimblepkg/download.nim b/src/nimblepkg/download.nim index 331b191b..ddd8955a 100644 --- a/src/nimblepkg/download.nim +++ b/src/nimblepkg/download.nim @@ -54,8 +54,8 @@ proc gitFetchTags*(repoDir: string, downloadMethod: DownloadMethod, options: Opt let submoduleFlag = if not options.ignoreSubmodules: " --recurse-submodules" else: "" tryDoCmdEx(&"git -C {repoDir} fetch --tags" & submoduleFlag) of DownloadMethod.hg: - assert false, "hg not supported" - + # In Mercurial, pulling updates also fetches all remote tags + tryDoCmdEx(&"hg --cwd {repoDir} pull") proc getTagsList*(dir: string, meth: DownloadMethod): seq[string] = var output: string