summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-05-05 11:41:55 -0600
committerJames Moger <james.moger@gitblit.com>2014-05-05 11:41:55 -0600
commit5b0358f1c233becfa9e703a3ab3c962bdb81846e (patch)
tree8e0672cefbc85e9fda94d74e81e70f4a9c4d0eae
parent590e80d7624cbd10ea6890decdb1dcbc1c1c9417 (diff)
parenta806d728a60525720e0ef6c5bcb7e7062a4835ad (diff)
downloadgitblit-5b0358f1c233becfa9e703a3ab3c962bdb81846e.tar.gz
gitblit-5b0358f1c233becfa9e703a3ab3c962bdb81846e.zip
Merged #61 "Barnum: Create ticket/N branch on pt start N"
-rw-r--r--src/main/java/pt.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/pt.py b/src/main/java/pt.py
index 02c4168a..f45baded 100644
--- a/src/main/java/pt.py
+++ b/src/main/java/pt.py
@@ -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: