diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2011-09-12 16:02:49 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2011-09-12 16:02:49 -0400 |
commit | 4fd0cc46dcca81f7fb503cb9e5be340f9366b7c5 (patch) | |
tree | 3e777c3b3edc3a7566939dd12590d666d0380e7f | |
parent | 3172fcbd5c9e300091dd60b1f96dc2aeb5a5fdf9 (diff) |
Catch trying to refile an already filed bug
If 'git bz file' is used with a commit message that contains a
bug reference, prompt before filing again.
https://bugzilla.gnome.org/show_bug.cgi?id=624461
-rwxr-xr-x | git-bz | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1965,6 +1965,17 @@ def do_file(*args): commits = get_commits(commit_or_revision_range) + bug_references = [c for c in extract_and_collate_bugs(commits)] + if len(bug_references) > 0: + print ("Found existing bug reference%s in commit message%s:" % + ("" if len(bug_references) == 1 else "s", + "" if len(commits) == 1 else "s")) + for reference, _ in bug_references: + print " ", reference.get_url() + if not prompt("File anyway?"): + print "Aborting" + sys.exit(0) + if global_options.add_url: check_add_url(commits, is_add_url=False) |