diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-01-23 15:48:50 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-01-23 15:50:09 +0100 |
commit | 61513e6869a0c6d9036da3fe255bf2e2d3f5796a (patch) | |
tree | 6a51ddd3037ffe53bbc1f887693119ad874be738 /gbp | |
parent | 7f00d3967cf5f75b7cf1e6469781094e61842d9b (diff) |
git.rev_parse: unconditionally use --quiet
to avoid the confusing "fatal: Needed a single revision" error message
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/deb.py | 2 | ||||
-rw-r--r-- | gbp/git.py | 6 |
2 files changed, 3 insertions, 5 deletions
@@ -181,7 +181,7 @@ def parse_changelog_repo(repo, branch, filename): # to show as well, but we want to check if the branch / filename # exists first, so we can give a separate error from other # repository errors. - sha = repo.rev_parse("%s:%s" % (branch, filename), quiet=True) + sha = repo.rev_parse("%s:%s" % (branch, filename)) except GitRepositoryError: raise NoChangelogError, "Changelog %s not found in branch %s" % (filename, branch) @@ -324,11 +324,9 @@ class GitRepository(object): raise GitRepositoryError, "can't find tag for %s" % commit return tag[0].strip() - def rev_parse(self, name, quiet=False): + def rev_parse(self, name): "find the SHA1" - args = [ "--verify", name] - if quiet: - args.insert(0, "--quiet") + args = [ "--quiet", "--verify", name ] sha, ret = self.__git_getoutput('rev-parse', args) if ret: raise GitRepositoryError, "revision '%s' not found" % name |