]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
hg.py: Fixed fetch failure that occurs when SRCREV is a tag.
authorJon Szymaniak <jon.szymaniak@gmail.com>
Mon, 17 Dec 2012 14:22:51 +0000 (09:22 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Jan 2013 12:49:59 +0000 (12:49 +0000)
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>
lib/bb/fetch2/hg.py

index 155ae67bbd81b293baf39f57b74f7195f17338d7..b1c8675dd4c0c8f16943b323f11d7e1f5e7339e9 100644 (file)
@@ -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":