Patchwork [bitbake-devel] HG Fetch with username and password in url

login
register
mail settings
Submitter Volker Vogelhuber
Date April 29, 2014, 3:34 p.m.
Message ID <535FC66B.8050802@digitalendoscopy.de>
Download mbox | patch
Permalink /patch/71235/
State New
Headers show

Comments

Volker Vogelhuber - April 29, 2014, 3:34 p.m.
Following up a previous patch for mercurial fetcher, I just fixed a 
problem when calling update on a repository with subrepositories enabled.

Attached a patch that fixes this problem

Patch

From caae519a2bd64bf7c729bb26aff344827def47fb Mon Sep 17 00:00:00 2001
From: Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>
Date: Tue, 29 Apr 2014 15:29:47 +0200
Subject: [PATCH] - fixed authentication issues in case of using sub
 repositories

Signed-off-by: Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>
---
 bitbake/lib/bb/fetch2/hg.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index cf21481..2b56e86 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -120,7 +120,7 @@  class Hg(FetchMethod):
             else:
                 cmd = "%s pull" % (basecmd)
         elif command == "update":
-            cmd = "%s update -C %s" % (basecmd, " ".join(options))
+            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))
         else:
             raise FetchError("Invalid hg command %s" % command, ud.url)
 
-- 
1.9.1