aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-05-11 21:31:17 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-05-11 21:31:17 +0000
commitfdd4ccc42c19e9f5c069c83fd09f3bd15333cbb9 (patch)
tree2dcb11ddb9aa3ed2977ce321fb8bc81660be7b59
parent5e8f28da755ad3c308b9e94e3849dcaf34d4b255 (diff)
downloadbitbake-fdd4ccc42c19e9f5c069c83fd09f3bd15333cbb9.tar.gz
fetch/git.py: Add username handling to git fetcher (from Poky)
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/fetch/git.py7
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 53570bacc..4dd6a1b3e 100644
--- 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
diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py
index dbf8f3aa2..62bd2202e 100644
--- a/lib/bb/fetch/git.py
+++ b/lib/bb/fetch/git.py
@@ -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):