diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-27 13:56:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-27 13:56:30 +0100 |
commit | 303e6256947f4df4f283b75b7ccfdffa72864d67 (patch) | |
tree | 73b2ae1ffe095f8ebaa12d4f06a9e3935b283653 /lib | |
parent | f787957a224e8c2682a19e5c4a4d9c86bdce52ba (diff) | |
download | bitbake-303e6256947f4df4f283b75b7ccfdffa72864d67.tar.gz |
fetch2/hg: Fix username/password handling
We should only add user/password options if they're specified as in the
fetch case. Patch from Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/fetch2/hg.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py index 5760fcdc5..81592f6e0 100644 --- a/lib/bb/fetch2/hg.py +++ b/lib/bb/fetch2/hg.py @@ -123,7 +123,10 @@ class Hg(FetchMethod): else: cmd = "%s pull" % (basecmd) elif command == "update": - cmd = "%s update --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" -C %s" % (basecmd, ud.user, ud.pswd, proto, " ".join(options)) + if ud.user and ud.pswd: + cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" update -C %s" % (basecmd, ud.user, ud.pswd, proto, " ".join(options)) + else: + cmd = "%s update -C %s" % (basecmd, " ".join(options)) else: raise FetchError("Invalid hg command %s" % command, ud.url) |