summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2012-10-26 12:18:00 -0700
committerShawn O. Pearce <sop@google.com>2012-10-26 12:24:57 -0700
commitcd81dd6403fc8dbe6ec5920c517d9083902c3c1f (patch)
tree935f3f82d2eb32c06b812f66d56d138074309ef8 /subcmds/sync.py
parent80d2ceb22267b7dc61b107934ff5264b6439a785 (diff)
downloadgit-repo-cd81dd6403fc8dbe6ec5920c517d9083902c3c1f.tar.gz
Revert "Represent git-submodule as nested projects"v1.11.1
This reverts commit 69998b0c6ff724bf620480140ccce648fec7d6a9. Broke Android's non-gitmodule use case. Conflicts: project.py subcmds/sync.py Change-Id: I68ceeb63d8ee3b939f85a64736bdc81dfa352aed
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py21
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