aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtms24
1 files changed, 12 insertions, 12 deletions
diff --git a/tms b/tms
index 3aace6b..1b7841b 100755
--- a/tms
+++ b/tms
@@ -539,7 +539,7 @@ class Branch:
if status != 0:
sys.exit(status)
- def request_pull(self, repo, targets = None, iteration = 1, dry_run = False):
+ def request_pull(self, repo, targets = None, branches = None, iteration = 1, dry_run = False):
git_config = repo.config_reader()
config = read_dotconfig()
buckets = {}
@@ -549,6 +549,9 @@ class Branch:
if targets and branch.target.name not in targets:
continue
+ if branches and branch.name not in branches:
+ continue
+
if branch.target not in buckets:
buckets[branch.target] = [ ]
@@ -649,12 +652,15 @@ class Branch:
with io.open(filename, 'w') as output:
print(message, file = output, end = '')
- def tag(self, repo, prefix, targets = None, iteration = 1, dry_run = False):
+ def tag(self, repo, prefix, targets = None, branches = None, iteration = 1, dry_run = False):
for branch in self.branches:
if branch.target and not branch.merged:
if targets and branch.target.name not in targets:
continue
+ if branches and branch.name not in branches:
+ continue
+
if prefix is None:
tag_prefix = branch.target.prefix
else:
@@ -1002,12 +1008,9 @@ class CommandRequestPull(Command):
tree = load_tree()
for branch in tree:
- if args.branches and branch.name not in args.branches:
- continue
-
print('request-pull for %s...' % branch)
- branch.request_pull(repo, targets = args.targets, iteration = args.iteration,
- dry_run = args.dry_run)
+ branch.request_pull(repo, targets = args.targets, branches = args.branches,
+ iteration = args.iteration, dry_run = args.dry_run)
class CommandTag(Command):
name = 'tag'
@@ -1035,12 +1038,9 @@ class CommandTag(Command):
tree = load_tree()
for branch in tree:
- if args.branches and branch.name not in args.branches:
- continue
-
print('tagging branch %s...' % branch)
- branch.tag(repo, args.prefix, targets = args.targets, iteration = args.iteration,
- dry_run = args.dry_run)
+ branch.tag(repo, args.prefix, targets = args.targets, branches = args.branches,
+ iteration = args.iteration, dry_run = args.dry_run)
commands = [
CommandBuild,