summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-05-11 21:27:24 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-05-11 21:27:24 +0000
commitf7a4bcbc920cf0563aad5ff182b91aaa0b8998ab (patch)
tree8ba5214ca23c98bf616b7c098578b7caa1451909
parentaae20d9e66160a9f3edc8f5b1fda1039e00d3b58 (diff)
downloadbitbake-f7a4bcbc920cf0563aad5ff182b91aaa0b8998ab.tar.gz
fetch/hg.py: Fix hg checkouts of specific revisions (from Poky)
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/fetch/hg.py9
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9fe3bf3d8..2384cb98a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -76,6 +76,7 @@ Changes in BitBake 1.8.12:
proxies to work better. (from Poky)
- Also allow user and pswd options in SRC_URIs globally (from Poky)
- Improve proxy handling when using mirrors (from Poky)
+ - Fix hg checkouts of specific revisions
Changes in BitBake 1.8.10:
- Psyco is available only for x86 - do not use it on other architectures.
diff --git a/lib/bb/fetch/hg.py b/lib/bb/fetch/hg.py
index b87fd0fbe..7643e159e 100644
--- a/lib/bb/fetch/hg.py
+++ b/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: