summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/hg.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/fetch2/hg.py')
-rw-r--r--lib/bb/fetch2/hg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index 8a31b20ff..157b1b1d8 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -110,7 +110,10 @@ class Hg(FetchMethod):
options.append("-r %s" % ud.revision)
if command == "fetch":
- cmd = "%s clone %s %s://%s/%s %s" % (basecmd, " ".join(options), proto, hgroot, ud.module, ud.module)
+ 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\" clone %s %s://%s/%s %s" % (basecmd, ud.user, ud.pswd, " ".join(options), proto, hgroot, ud.module, ud.module)
+ else:
+ cmd = "%s clone %s %s://%s/%s %s" % (basecmd, " ".join(options), proto, hgroot, ud.module, ud.module)
elif command == "pull":
# do not pass options list; limiting pull to rev causes the local
# repo not to contain it and immediately following "update" command