From 424643f46300838e911ad152736676a329b68e7f Mon Sep 17 00:00:00 2001 From: Volker Vogelhuber Date: Fri, 9 May 2014 10:10:13 +0200 Subject: bitbake: fix cloning of mercurial repository with username and password specified in url (Bitbake rev: 9a328262e047562a6edf7b2ec7b8a1949e287cbe) (Bitbake rev: 410372783b22cf3ff2d8bbd80a5c3f4a1694e9a4) Signed-off-by: Volker Vogelhuber Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/hg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py index 8a31b20ff1..157b1b1d8b 100644 --- a/bitbake/lib/bb/fetch2/hg.py +++ b/bitbake/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 -- cgit v1.2.3-54-g00ecf