aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-01-23 15:48:50 +0100
committerGuido Günther <agx@sigxcpu.org>2011-01-23 15:50:09 +0100
commit61513e6869a0c6d9036da3fe255bf2e2d3f5796a (patch)
tree6a51ddd3037ffe53bbc1f887693119ad874be738 /gbp
parent7f00d3967cf5f75b7cf1e6469781094e61842d9b (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.py2
-rw-r--r--gbp/git.py6
2 files changed, 3 insertions, 5 deletions
diff --git a/gbp/deb.py b/gbp/deb.py
index 1a53563c..ff361d66 100644
--- a/gbp/deb.py
+++ b/gbp/deb.py
@@ -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)
diff --git a/gbp/git.py b/gbp/git.py
index 04fef6a3..4f2507f9 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -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