aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-09-30 20:05:51 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-09-30 20:05:51 +0000
commit60794b169f005a712aa1c1668b45640fdd1832cf (patch)
tree694a04faf7c56426da466f040adb73b734749b58
parentb3acedac34137d83dda0f4aafe2c4af9031364e4 (diff)
downloadbitbake-60794b169f005a712aa1c1668b45640fdd1832cf.tar.gz
fetch/hg.py: Fix hg fetcher username/password handling and fix crash
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/fetch/hg.py10
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 225786c51..943a5f972 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -145,6 +145,7 @@ Changes in Bitbake 1.9.x:
- Allow to checkout CVS by Date and Time. Just add HHmm to the SRCDATE.
- Move prunedir function to utils.py and add explode_dep_versions function
- Raise an exception if SRCREV == 'INVALID'
+ - Fix hg fetcher username/password handling and fix crash
Changes in Bitbake 1.8.0:
- Release 1.7.x as a stable series
diff --git a/lib/bb/fetch/hg.py b/lib/bb/fetch/hg.py
index ee3bd2f7f..1cd5a8aa5 100644
--- a/lib/bb/fetch/hg.py
+++ b/lib/bb/fetch/hg.py
@@ -79,7 +79,10 @@ class Hg(Fetch):
host = "/"
ud.host = "localhost"
- hgroot = host + ud.path
+ if ud.user == None:
+ hgroot = host + ud.path
+ else:
+ hgroot = ud.user + "@" + host + ud.path
if command is "info":
return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module)
@@ -91,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: