Don't delete dormant branches, even if empty.

1) The current behavior feels contrary to the documentation; which says
"If true, will cause rebase-update to skip all processing on the branch."

2) The new behavior allows a workflow where 'master' is empty and
marked dormant, but kept up to date as the parent for all other
branches.

Change-Id: Ic7440706a69753f796846dd84ecbf8bcf172ba4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2128675
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
changes/75/2128675/3
Dale Curtis 5 years ago committed by LUCI CQ
parent df70c81527
commit 0610193326

@ -92,6 +92,9 @@ def remove_empty_branches(branch_tree):
reparents = {}
downstreams = collections.defaultdict(list)
for branch, parent in git.topo_iter(branch_tree, top_down=False):
if git.is_dormant(branch):
continue
downstreams[parent].append(branch)
# If branch and parent have the same tree, then branch has to be marked

Loading…
Cancel
Save