Explorar o código

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

Bug: chromium:950002
Test: repo sync chromeos using release manifest file
Change-Id: I613df6a1973eb36acd806a703e72f5172554bcc7
Kuang-che Wu %!s(int64=6) %!d(string=hai) anos
pai
achega
0d9b16d1d8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      subcmds/sync.py

+ 2 - 1
subcmds/sync.py

@@ -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: