All of lore.kernel.org
 help / color / mirror / Atom feed
* HG clone with username and password in url
@ 2014-05-09  8:12 Volker Vogelhuber
  0 siblings, 0 replies; only message in thread
From: Volker Vogelhuber @ 2014-05-09  8:12 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

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.



[-- Attachment #2: 0001-fix-cloning-of-mercurial-repository-with-username-an.patch --]
[-- Type: text/x-patch, Size: 1528 bytes --]

From ed81d51a391c39aa42d01bf9ebf00e9f88dd9c90 Mon Sep 17 00:00:00 2001
From: Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>
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 <v.vogelhuber@digitalendoscopy.de>
---
 bitbake/lib/bb/fetch2/hg.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index cf21481..8c41d4d 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
-- 
1.9.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-09  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09  8:12 HG clone with username and password in url Volker Vogelhuber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.