diff options
author | Guido Guenther <agx@sigxcpu.org> | 2007-10-07 14:17:32 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2007-10-07 14:17:32 +0200 |
commit | 4a3353067dd006b10150d5964d282cd0818a6b0a (patch) | |
tree | 6ae08166135ea88e953e588c11211bb34aa897d2 | |
parent | fee45b0acd4f9539c438fc6d9d457b64f55928ee (diff) | |
download | git-buildpackage-4a3353067dd006b10150d5964d282cd0818a6b0a.tar.gz git-buildpackage-4a3353067dd006b10150d5964d282cd0818a6b0a.tar.bz2 git-buildpackage-4a3353067dd006b10150d5964d282cd0818a6b0a.zip |
add --git-log to pass options along to git-log
This can be used for filtering:
git-dch --git-log="--author=Guido --author=Otavio" would only select commits by
these persons - very handy if upstream also uses git.
-rwxr-xr-x | git-dch | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -31,10 +31,10 @@ from gbp.deb_utils import parse_changelog snapshot_re = "\s*\*\* SNAPSHOT build @(?P<commit>[a-z0-9]+)\s+\*\*" -def get_log(start, end): +def get_log(start, end, options): """Get the shortlog from commit 'start' to commit 'end'""" try: - p1 = subprocess.Popen(["git-log", "--no-merges", "%s...%s" % (start, end)], + p1 = subprocess.Popen("git-log %s %s...%s" % (options, start, end), shell=True, stdout=subprocess.PIPE) p2 = subprocess.Popen(["git-shortlog"], stdin=p1.stdout, stdout=subprocess.PIPE) changes = p2.communicate()[0].split('\n') @@ -195,6 +195,7 @@ def main(argv): help="mark as snapshot build") parser.add_option("-a", "--auto", action="store_true", dest="auto", default=False, help="autocomplete changelog from last snapshot or tag") + parser.add_option("--git-log", dest="git_log", help="options to pass to git-log", default="--no-merges") (options, args) = parser.parse_args(argv[1:]) if options.snapshot and options.release: @@ -233,7 +234,7 @@ def main(argv): if not since: since = build_tag(options.debian_tag, cp['Version']) - changes = get_log(since, until) + changes = get_log(since, until, options.git_log) if changes: if cp['Distribution'] != "UNRELEASED": add_changelog_section(distribution="UNRELEASED", msg="UNRELEASED") |