diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-08-24 13:04:23 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-24 19:29:22 -0700 |
commit | 0ed281feb6d244d3700da484f4e83394ae394f93 (patch) | |
tree | 7fbbb40d0ec3ecdbd08ae7ed818a7231f65e9455 | |
parent | 692c2fcead5c82249359ad54d2c7941d087a2eb3 (diff) | |
download | bitbake-0ed281feb6d244d3700da484f4e83394ae394f93.tar.gz |
bb/fetch2/git: add checkstatus command
Use git ls-remote to implement checkstatus command for the git fetcher.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/git.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 25c2c510f..97bf0865a 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -298,3 +298,11 @@ class Git(FetchMethod): buildindex = "%s" % output.split()[0] logger.debug(1, "GIT repository for %s in %s is returning %s revisions in rev-list before %s", url, ud.clonedir, buildindex, rev) return buildindex + + def checkstatus(self, uri, ud, d): + fetchcmd = "%s ls-remote %s" % (ud.basecmd, uri) + try: + runfetchcmd(fetchcmd, d, quiet=True) + return True + except FetchError: + return False |