summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Druart <jonathan.druart@gmail.com>2021-04-09 09:42:01 +0200
committerJonathan Druart <jonathan.druart@gmail.com>2021-05-12 14:50:34 +0200
commit8fd0053fe139282bc1887f6f6fdc959623e0441a (patch)
treeea41700fedbb96302505be169ae7dfc267224b30
parentb28b39af59b04627aeb8cdb82c36595acaab8907 (diff)
downloadgit-bz-8fd0053fe139282bc1887f6f6fdc959623e0441a.tar.gz
Issue #6 - list of bugs applied must be global
-rwxr-xr-xgit-bz10
1 files changed, 6 insertions, 4 deletions
diff --git a/git-bz b/git-bz
index 2a1fbb3..de89eb7 100755
--- a/git-bz
+++ b/git-bz
@@ -115,6 +115,7 @@ import string
# options dictionary from optparse
global_options = None
+bugs_applied = []
# Utility functions for git
# =========================
@@ -1739,7 +1740,6 @@ def do_apply(*args):
print("No patches on bug %d" % bug.id)
return
- bugs_applied = []
patches = []
patches_by_id = {}
for patch in bug.patches:
@@ -1753,6 +1753,10 @@ def do_apply(*args):
for d_id in dependencies:
if d_id == '':
continue
+
+ if d_id in bugs_applied:
+ continue
+
dep_bug = Bug.load(BugHandle.parse_or_die(d_id),
attachmentdata=False)
s = dep_bug.bug_status
@@ -1882,7 +1886,7 @@ FIXME: need commit message.
add_url(bug, commits)
bugs_applied.append(bug_ref)
- return bugs_applied
+ return bug_ref
def strip_bug_url(bug, commit_body):
# Strip off the trailing bug URLs we add with -u; we do this before
@@ -2702,7 +2706,6 @@ if len(args) < min_args or len(args) > max_args:
if command == 'add-url':
do_add_url(*args)
elif command == 'apply':
- bugs_applied = []
if not args:
# continue, skip or abort
do_apply(*args)
@@ -2715,7 +2718,6 @@ elif command == 'apply':
if applied is None:
break
- bugs_applied.extend(applied)
elif command == 'attach':
do_attach(*args)
elif command == 'components':