sync: deleted unused repos in reversed order (children before parent)

Bug: chromium:950002
Test: repo sync chromeos using release manifest file
Change-Id: I613df6a1973eb36acd806a703e72f5172554bcc7
This commit is contained in:
Kuang-che Wu 2019-04-06 00:49:47 +08:00
parent e57f1146de
commit 0d9b16d1d8

View File

@ -550,7 +550,8 @@ later is required to fix a server side protocol bug.
old_project_paths = fd.read().split('\n')
finally:
fd.close()
for path in old_project_paths:
# In reversed order, so subfolders are deleted before parent folder.
for path in sorted(old_project_paths, reverse=True):
if not path:
continue
if path not in new_project_paths: