]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake hg fetcher: Add fix from Matt Hoosier
authorRichard Purdie <richard@openedhand.com>
Wed, 10 Sep 2008 16:25:46 +0000 (16:25 +0000)
committerRichard Purdie <richard@openedhand.com>
Wed, 10 Sep 2008 16:25:46 +0000 (16:25 +0000)
The Mercurial fetcher right now will fail when used to incrementally
fetch an update to a local clone of a repository already fetched at
some prior revision. The culprit is the sequence:

 hg pull -r <rev>
 hg update -C <rev>

A subtlety in the way that Mercurial stores its tags (in a normally
version-controlled file called .hgtags) has the side-effect that a
repository fetched at a tag "foo" will not actually contain a
new-enough copy of the .hgtags file to be self-aware of the foo tag's
existence.

The solution is just to get all the changesets in the repository on
incremental upgrades, so that the following "hg update" will be able
to resolve the tag.

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5170 311d38ba-8fff-0310-9ca6-ca027cbcb966

bitbake/lib/bb/fetch/hg.py

index c7d2e62c13cf020d8af1f0600a1bf5acf48f7800..1cd5a8aa5cdceb6b8bd883fd1246d794e2315c40 100644 (file)
@@ -94,7 +94,10 @@ class Hg(Fetch):
         if command is "fetch":
             cmd = "%s clone %s %s://%s/%s %s" % (basecmd, " ".join(options), proto, hgroot, ud.module, ud.module)
         elif command is "pull":
-            cmd = "%s pull %s" % (basecmd, " ".join(options))
+            # do not pass options list; limiting pull to rev causes the local
+            # repo not to contain it and immediately following "update" command
+            # will crash
+            cmd = "%s pull" % (basecmd)
         elif command is "update":
             cmd = "%s update -C %s" % (basecmd, " ".join(options))
         else: