diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-05-11 21:31:17 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-05-11 21:31:17 +0000 |
commit | 050e89b094d853b216ce03746dc55fbfa2fbf654 (patch) | |
tree | 02510cac08af85f9bab43416fc1e5ddabbcd598a | |
parent | a962a637a33dcafd3b113b13cc19141787479ff6 (diff) | |
download | bitbake-050e89b094d853b216ce03746dc55fbfa2fbf654.tar.gz |
fetch/git.py: Add username handling to git fetcher (from Poky)
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/bb/fetch/git.py | 7 |
2 files changed, 7 insertions, 1 deletions
@@ -78,6 +78,7 @@ Changes in BitBake 1.8.12: - Improve proxy handling when using mirrors (from Poky) - 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.10: - Psyco is available only for x86 - do not use it on other architectures. diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py index 8006466cf..97cd0a247 100644 --- a/lib/bb/fetch/git.py +++ b/lib/bb/fetch/git.py @@ -135,7 +135,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): |