Commit b58d4bda authored by Sergiy Belozorov's avatar Sergiy Belozorov Committed by Commit Bot

Add a feature to specify branches to be re-based

Change-Id: I00f1d6716ca5ece647d7ac15471ded25c1f164b2
Reviewed-on: https://chromium-review.googlesource.com/c/1370125Reviewed-by: 's avatarMarc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
parent 7fa4fbc4
......@@ -223,6 +223,9 @@ def main(args=None):
parser.add_argument('--no_fetch', '--no-fetch', '-n',
action='store_true',
help='Skip fetching remotes.')
parser.add_argument('branches', nargs='*',
help='Branches to be rebased. All branches are assumed '
'if none specified.')
opts = parser.parse_args(args)
if opts.verbose: # pragma: no cover
......@@ -273,6 +276,9 @@ def main(args=None):
# Rebase each branch starting with the root-most branches and working
# towards the leaves.
for branch, parent in git.topo_iter(branch_tree):
# Only rebase specified branches, unless none specified.
if opts.branches and branch not in opts.branches:
continue
if git.is_dormant(branch):
print 'Skipping dormant branch', branch
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment