diff options
author | Shawn O. Pearce <sop@google.com> | 2012-10-26 12:30:38 -0700 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-10-26 12:30:38 -0700 |
commit | de7eae482664d4bda61238b6adb679b3b92535d2 (patch) | |
tree | fab047f944470100c621b39da83bd80991f7bdbf /subcmds/sync.py | |
parent | 2fe99e8820a84f545ad45d53921dc94b8bc9d4f3 (diff) | |
parent | cd81dd6403fc8dbe6ec5920c517d9083902c3c1f (diff) | |
download | git-repo-de7eae482664d4bda61238b6adb679b3b92535d2.tar.gz |
Merge "Revert "Represent git-submodule as nested projects""
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 7416f4c3..d4637d0c 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -563,31 +563,12 @@ uncommitted changes are present' % project.relpath | |||
563 | to_fetch.extend(all_projects) | 563 | to_fetch.extend(all_projects) |
564 | to_fetch.sort(key=self._fetch_times.Get, reverse=True) | 564 | to_fetch.sort(key=self._fetch_times.Get, reverse=True) |
565 | 565 | ||
566 | fetched = self._Fetch(to_fetch, opt) | 566 | self._Fetch(to_fetch, opt) |
567 | _PostRepoFetch(rp, opt.no_repo_verify) | 567 | _PostRepoFetch(rp, opt.no_repo_verify) |
568 | if opt.network_only: | 568 | if opt.network_only: |
569 | # bail out now; the rest touches the working tree | 569 | # bail out now; the rest touches the working tree |
570 | return | 570 | return |
571 | 571 | ||
572 | # Iteratively fetch missing and/or nested unregistered submodules | ||
573 | previously_missing_set = set() | ||
574 | while True: | ||
575 | self.manifest._Unload() | ||
576 | all_projects = self.GetProjects(args, missing_ok=True) | ||
577 | missing = [] | ||
578 | for project in all_projects: | ||
579 | if project.gitdir not in fetched: | ||
580 | missing.append(project) | ||
581 | if not missing: | ||
582 | break | ||
583 | # Stop us from non-stopped fetching actually-missing repos: If set of | ||
584 | # missing repos has not been changed from last fetch, we break. | ||
585 | missing_set = set(p.name for p in missing) | ||
586 | if previously_missing_set == missing_set: | ||
587 | break | ||
588 | previously_missing_set = missing_set | ||
589 | fetched.update(self._Fetch(missing, opt)) | ||
590 | |||
591 | if self.manifest.IsMirror: | 572 | if self.manifest.IsMirror: |
592 | # bail out now, we have no working tree | 573 | # bail out now, we have no working tree |
593 | return | 574 | return |