summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-04-21 17:42:47 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-04-21 17:42:47 +0100
commit5264d4b9e2506f10a8084c4df9429855e7a03405 (patch)
tree6711e7fa3485eb95d19006f8b58a19855592f0e9 /bitbake/lib
parent5df6deaa32e4f6d0a8985403970a137270491991 (diff)
downloadopenembedded-core-5264d4b9e2506f10a8084c4df9429855e7a03405.tar.gz
openembedded-core-5264d4b9e2506f10a8084c4df9429855e7a03405.tar.bz2
openembedded-core-5264d4b9e2506f10a8084c4df9429855e7a03405.zip
bitbake: Fix a bug in the hg fetcher
Fix a bug in the hg fetcher where branch revisions are used with an initial checkout. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch/hg.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py
index b87fd0fbe5..7643e159ec 100644
--- a/bitbake/lib/bb/fetch/hg.py
+++ b/bitbake/lib/bb/fetch/hg.py
@@ -123,9 +123,6 @@ class Hg(Fetch):
bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd)
runfetchcmd(updatecmd, d)
- updatecmd = self._buildhgcommand(ud, d, "update")
- bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd)
- runfetchcmd(updatecmd, d)
else:
fetchcmd = self._buildhgcommand(ud, d, "fetch")
bb.msg.note(1, bb.msg.domain.Fetcher, "Fetch " + loc)
@@ -134,6 +131,12 @@ class Hg(Fetch):
os.chdir(ud.pkgdir)
bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % fetchcmd)
runfetchcmd(fetchcmd, d)
+
+ # Even when we clone (fetch), we still need to update as hg's clone
+ # won't checkout the specified revision if its on a branch
+ updatecmd = self._buildhgcommand(ud, d, "update")
+ bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd)
+ runfetchcmd(updatecmd, d)
os.chdir(ud.pkgdir)
try: