diff options
| -rw-r--r-- | git_superproject.py | 5 | ||||
| -rw-r--r-- | subcmds/sync.py | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/git_superproject.py b/git_superproject.py index 86100960..8769355c 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
| @@ -106,6 +106,11 @@ class Superproject(object): | |||
| 106 | """Returns a dictionary of projects and their commit ids.""" | 106 | """Returns a dictionary of projects and their commit ids.""" |
| 107 | return self._project_commit_ids | 107 | return self._project_commit_ids |
| 108 | 108 | ||
| 109 | @property | ||
| 110 | def manifest_path(self): | ||
| 111 | """Returns the manifest path if the path exists or None.""" | ||
| 112 | return self._manifest_path if os.path.exists(self._manifest_path) else None | ||
| 113 | |||
| 109 | def _GetBranch(self): | 114 | def _GetBranch(self): |
| 110 | """Returns the branch name for getting the approved manifest.""" | 115 | """Returns the branch name for getting the approved manifest.""" |
| 111 | p = self._manifest.manifestProject | 116 | p = self._manifest.manifestProject |
diff --git a/subcmds/sync.py b/subcmds/sync.py index a770c253..74617544 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -301,6 +301,12 @@ later is required to fix a server side protocol bug. | |||
| 301 | self.repodir, | 301 | self.repodir, |
| 302 | self.git_event_log, | 302 | self.git_event_log, |
| 303 | quiet=opt.quiet) | 303 | quiet=opt.quiet) |
| 304 | if opt.local_only: | ||
| 305 | manifest_path = superproject.manifest_path | ||
| 306 | if manifest_path: | ||
| 307 | self._ReloadManifest(manifest_path, load_local_manifests) | ||
| 308 | return manifest_path | ||
| 309 | |||
| 304 | all_projects = self.GetProjects(args, | 310 | all_projects = self.GetProjects(args, |
| 305 | missing_ok=True, | 311 | missing_ok=True, |
| 306 | submodules_ok=opt.fetch_submodules) | 312 | submodules_ok=opt.fetch_submodules) |
