summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/hg.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index b1c8675dd4..cf214816b7 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -92,7 +92,10 @@ class Hg(FetchMethod):
92 if not ud.user: 92 if not ud.user:
93 hgroot = host + ud.path 93 hgroot = host + ud.path
94 else: 94 else:
95 hgroot = ud.user + "@" + host + ud.path 95 if ud.pswd:
96 hgroot = ud.user + ":" + ud.pswd + "@" + host + ud.path
97 else:
98 hgroot = ud.user + "@" + host + ud.path
96 99
97 if command == "info": 100 if command == "info":
98 return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module) 101 return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module)
@@ -112,7 +115,10 @@ class Hg(FetchMethod):
112 # do not pass options list; limiting pull to rev causes the local 115 # do not pass options list; limiting pull to rev causes the local
113 # repo not to contain it and immediately following "update" command 116 # repo not to contain it and immediately following "update" command
114 # will crash 117 # will crash
115 cmd = "%s pull" % (basecmd) 118 if ud.user and ud.pswd:
119 cmd = "%s --config auth.default.prefix=* --config auth.default.username=%s --config auth.default.password=%s --config \"auth.default.schemes=%s\" pull" % (basecmd, ud.user, ud.pswd, proto)
120 else:
121 cmd = "%s pull" % (basecmd)
116 elif command == "update": 122 elif command == "update":
117 cmd = "%s update -C %s" % (basecmd, " ".join(options)) 123 cmd = "%s update -C %s" % (basecmd, " ".join(options))
118 else: 124 else: