]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fetch/git.py: Add username handling to git fetcher (from Poky)
authorRichard Purdie <rpurdie@linux.intel.com>
Mon, 11 May 2009 21:31:17 +0000 (21:31 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 11 May 2009 21:31:17 +0000 (21:31 +0000)
ChangeLog
lib/bb/fetch/git.py

index 53570bacc5c9e21ee9941efce83870343015ce84..4dd6a1b3ee97f537748ab3a3f44effb38ec19386 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -172,6 +172,7 @@ Changes in Bitbake 1.9.x:
        - Add bb.utils.prune_suffix function
        - Fix hg checkouts of specific revisions (from Poky)
        - Fix wget fetching of urls with parameters specified (from Poky)
+       - Add username handling to git fetcher (from Poky)
 
 Changes in Bitbake 1.8.0:
        - Release 1.7.x as a stable series
index dbf8f3aa2b11aea77dceb1deafcbfdff7cc351be..62bd2202ebd90242dffeafda7659acc47aa95c48 100644 (file)
@@ -134,7 +134,12 @@ class Git(Fetch):
         """
         Compute the HEAD revision for the url
         """
-        output = runfetchcmd("git ls-remote %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch), d, True)
+        if ud.user:
+            username = ud.user + '@'
+        else:
+            username = ""
+
+        output = runfetchcmd("git ls-remote %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d, True)
         return output.split()[0]
 
     def _build_revision(self, url, ud, d):