HG clone with username and password in url
Unfortunately my last patch for the hg fetcher (in dylan's bitbake version) with username and password was incomplete. The following patch hopefully fixes all cases where username and pasword authorization may be required.
From ed81d51a391c39aa42d01bf9ebf00e9f88dd9c90 Mon Sep 17 00:00:00 2001
From: Volker Vogelhuber <[email protected]>
Date: Fri, 9 May 2014 10:10:13 +0200
Subject: [PATCH] fix cloning of mercurial repository with username and
password specified in url
Signed-off-by Volker Vogelhuber <[email protected]>
--- bitbake/lib/bb/fetch2/hg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
bitbake/lib/bb/fetch2/hg.py +4 -1
@@ -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
Signature · 1 line
1.9.1