Browse Source

forall: use smart sync override manifest if it exists

If a workspace is synced with the -s or -t option, the included projects
may be different to those in the original manifest. However, when using
the forall command, the list of the projects from the original manifest
is used.

If the smart sync manifest file exists, use it to override the original
manifest.

Change-Id: Iaefcbe148d2158ac046f158d98bbd8b5a5378ce7
David Pursehouse 10 năm trước cách đây
mục cha
commit
6944cdb8d1
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      subcmds/forall.py

+ 7 - 0
subcmds/forall.py

@@ -205,6 +205,13 @@ without iterating through the remaining projects.
     mirror = self.manifest.IsMirror
     rc = 0
 
+    smart_sync_manifest_name = "smart_sync_override.xml"
+    smart_sync_manifest_path = os.path.join(
+      self.manifest.manifestProject.worktree, smart_sync_manifest_name)
+
+    if os.path.isfile(smart_sync_manifest_path):
+      self.manifest.Override(smart_sync_manifest_path)
+
     if not opt.regex:
       projects = self.GetProjects(args)
     else: