diff options
author | James Moger <james.moger@gitblit.com> | 2014-06-16 17:36:12 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-06-16 17:36:12 -0400 |
commit | 6b18b0761b726fd9aef1ebcc21b760378f7d4b5c (patch) | |
tree | 4bdb208cede00e637ce4704d942aa045f5af5ed9 /src/main/java/pt.py | |
parent | 07eb0963cae3a403f8774f65afa20c940ce7124f (diff) | |
parent | 9b575e8fac8d5e17e77cc284092abd856ddec8ac (diff) | |
download | gitblit-6b18b0761b726fd9aef1ebcc21b760378f7d4b5c.tar.gz gitblit-6b18b0761b726fd9aef1ebcc21b760378f7d4b5c.zip |
Merge release 1.6.0
Diffstat (limited to 'src/main/java/pt.py')
-rw-r--r-- | src/main/java/pt.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main/java/pt.py b/src/main/java/pt.py index 3b35c167..f45baded 100644 --- a/src/main/java/pt.py +++ b/src/main/java/pt.py @@ -54,9 +54,9 @@ def fetch(args): # fetch all current ticket patchsets print("Fetching ticket patchsets from the '{}' repository".format(args.remote)) if args.quiet: - __call(['git', 'fetch', args.remote, '--quiet']) + __call(['git', 'fetch', '-p', args.remote, '--quiet']) else: - __call(['git', 'fetch', args.remote]) + __call(['git', 'fetch', '-p', args.remote]) else: # fetch specific patchset __resolve_patchset(args) @@ -206,6 +206,12 @@ def start(args): branches.append(branch.strip()) branch = 'topic/' + args.topic + try: + int(args.topic) + branch = 'ticket/' + args.topic + except ValueError: + pass + illegals = set(branches) & {'topic', branch} # ensure there are no local branch names that will interfere with branch creation @@ -246,6 +252,13 @@ def propose(args): push_ref = topic except ValueError: pass + if curr_branch.startswith('ticket/'): + topic = curr_branch[7:].strip() + try: + int(topic) + push_ref = topic + except ValueError: + pass if push_ref is None: push_ref = 'new' else: @@ -288,8 +301,8 @@ def propose(args): if fields[0] == 'remote' and fields[1].strip().startswith('--> #'): # set the upstream branch configuration args.id = int(fields[1].strip()[len('--> #'):]) - __call(['git', 'fetch', args.remote]) - __call(['git', 'branch', '--set-upstream-to={}/ticket/{:d}'.format(args.remote, args.id)]) + __call(['git', 'fetch', '-p', args.remote]) + __call(['git', 'branch', '-u', '{}/ticket/{:d}'.format(args.remote, args.id)]) break return |