]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: Make sure the git remote head viewer preserves the username
authorRichard Purdie <rpurdie@linux.intel.com>
Wed, 17 Dec 2008 12:07:41 +0000 (12:07 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 17 Dec 2008 12:07:41 +0000 (12:07 +0000)
bitbake-dev/lib/bb/fetch/git.py
bitbake/lib/bb/fetch/git.py

index 26f2b47f2a5a603d6e4d85106a4c496910d6ee06..010a4f57a25ea404e8132011ab6b16e3b8b28897 100644 (file)
@@ -130,7 +130,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):
index 26f2b47f2a5a603d6e4d85106a4c496910d6ee06..010a4f57a25ea404e8132011ab6b16e3b8b28897 100644 (file)
@@ -130,7 +130,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):