aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/hg.py
diff options
context:
space:
mode:
authorJon Szymaniak <jon.szymaniak@gmail.com>2012-12-17 09:22:51 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 12:49:59 +0000
commitf0a6261d3a8ede9ebdb6383e02cb2c2de1690640 (patch)
treec962fe8d69cf14e163497391d001b691f4e38d04 /lib/bb/fetch2/hg.py
parent22bd19d208f0251f5a1f9b98f3cac66181f3fc07 (diff)
downloadbitbake-f0a6261d3a8ede9ebdb6383e02cb2c2de1690640.tar.gz
hg.py: Fixed fetch failure that occurs when SRCREV is a tag.
Removed "-r REV" from hg clone invocation to fetch the entire repo, rather than just the subset at the specified revision. This will ensure that the specified tag exists for successive commands (e.g., the update built on line 149.) Signed-off-by: Jon Szymaniak <jon.szymaniak@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/hg.py')
-rw-r--r--lib/bb/fetch2/hg.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index 155ae67bb..b1c8675dd 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -98,7 +98,12 @@ class Hg(FetchMethod):
return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module)
options = [];
- if ud.revision:
+
+ # Don't specify revision for the fetch; clone the entire repo.
+ # This avoids an issue if the specified revision is a tag, because
+ # the tag actually exists in the specified revision + 1, so it won't
+ # be available when used in any successive commands.
+ if ud.revision and command != "fetch":
options.append("-r %s" % ud.revision)
if command == "fetch":