mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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>
This commit is contained in:
@@ -92,6 +92,9 @@ def remove_empty_branches(branch_tree):
|
|||||||
reparents = {}
|
reparents = {}
|
||||||
downstreams = collections.defaultdict(list)
|
downstreams = collections.defaultdict(list)
|
||||||
for branch, parent in git.topo_iter(branch_tree, top_down=False):
|
for branch, parent in git.topo_iter(branch_tree, top_down=False):
|
||||||
|
if git.is_dormant(branch):
|
||||||
|
continue
|
||||||
|
|
||||||
downstreams[parent].append(branch)
|
downstreams[parent].append(branch)
|
||||||
|
|
||||||
# If branch and parent have the same tree, then branch has to be marked
|
# If branch and parent have the same tree, then branch has to be marked
|
||||||
|
|||||||
Reference in New Issue
Block a user