View | Details | Raw Unified | Return to bug 28608
Collapse All | Expand All

(-)a/git-bz (-5 / +6 lines)
Lines 115-120 import string Link Here
115
115
116
# options dictionary from optparse
116
# options dictionary from optparse
117
global_options = None
117
global_options = None
118
bugs_applied = []
118
119
119
# Utility functions for git
120
# Utility functions for git
120
# =========================
121
# =========================
Lines 1739-1745 def do_apply(*args): Link Here
1739
        print("No patches on bug %d" % bug.id)
1740
        print("No patches on bug %d" % bug.id)
1740
        return
1741
        return
1741
1742
1742
    bugs_applied = []
1743
    patches = []
1743
    patches = []
1744
    patches_by_id = {}
1744
    patches_by_id = {}
1745
    for patch in bug.patches:
1745
    for patch in bug.patches:
Lines 1753-1758 def do_apply(*args): Link Here
1753
        for d_id in dependencies:
1753
        for d_id in dependencies:
1754
            if d_id == '':
1754
            if d_id == '':
1755
                continue
1755
                continue
1756
1757
            if d_id in bugs_applied:
1758
                continue
1759
1756
            dep_bug = Bug.load(BugHandle.parse_or_die(d_id),
1760
            dep_bug = Bug.load(BugHandle.parse_or_die(d_id),
1757
                           attachmentdata=False)
1761
                           attachmentdata=False)
1758
            s = dep_bug.bug_status
1762
            s = dep_bug.bug_status
Lines 1882-1888 FIXME: need commit message. Link Here
1882
        add_url(bug, commits)
1886
        add_url(bug, commits)
1883
1887
1884
    bugs_applied.append(bug_ref)
1888
    bugs_applied.append(bug_ref)
1885
    return bugs_applied
1889
    return bug_ref
1886
1890
1887
def strip_bug_url(bug, commit_body):
1891
def strip_bug_url(bug, commit_body):
1888
    # Strip off the trailing bug URLs we add with -u; we do this before
1892
    # Strip off the trailing bug URLs we add with -u; we do this before
Lines 2702-2708 if len(args) < min_args or len(args) > max_args: Link Here
2702
if command == 'add-url':
2706
if command == 'add-url':
2703
    do_add_url(*args)
2707
    do_add_url(*args)
2704
elif command == 'apply':
2708
elif command == 'apply':
2705
    bugs_applied = []
2706
    if not args:
2709
    if not args:
2707
        # continue, skip or abort
2710
        # continue, skip or abort
2708
        do_apply(*args)
2711
        do_apply(*args)
Lines 2715-2721 elif command == 'apply': Link Here
2715
        if applied is None:
2718
        if applied is None:
2716
            break
2719
            break
2717
2720
2718
        bugs_applied.extend(applied)
2719
elif command == 'attach':
2721
elif command == 'attach':
2720
    do_attach(*args)
2722
    do_attach(*args)
2721
elif command == 'components':
2723
elif command == 'components':
2722
- 

Return to bug 28608