diff options
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 3fa6efa5..df536892 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -54,7 +54,6 @@ from git_command import git_require | |||
54 | from git_config import GetUrlCookieFile | 54 | from git_config import GetUrlCookieFile |
55 | from git_refs import R_HEADS, HEAD | 55 | from git_refs import R_HEADS, HEAD |
56 | import git_superproject | 56 | import git_superproject |
57 | import gitc_utils | ||
58 | from project import Project | 57 | from project import Project |
59 | from project import RemoteSpec | 58 | from project import RemoteSpec |
60 | from command import ( | 59 | from command import ( |
@@ -77,7 +76,6 @@ from progress import Progress, elapsed_str, jobs_str | |||
77 | from repo_trace import Trace | 76 | from repo_trace import Trace |
78 | import ssh | 77 | import ssh |
79 | from wrapper import Wrapper | 78 | from wrapper import Wrapper |
80 | from manifest_xml import GitcManifest | ||
81 | 79 | ||
82 | _ONE_DAY_S = 24 * 60 * 60 | 80 | _ONE_DAY_S = 24 * 60 * 60 |
83 | 81 | ||
@@ -1678,50 +1676,6 @@ later is required to fix a server side protocol bug. | |||
1678 | opt, args, superproject_logging_data, manifest | 1676 | opt, args, superproject_logging_data, manifest |
1679 | ) | 1677 | ) |
1680 | 1678 | ||
1681 | if self.gitc_manifest: | ||
1682 | gitc_manifest_projects = self.GetProjects(args, missing_ok=True) | ||
1683 | gitc_projects = [] | ||
1684 | opened_projects = [] | ||
1685 | for project in gitc_manifest_projects: | ||
1686 | if ( | ||
1687 | project.relpath in self.gitc_manifest.paths | ||
1688 | and self.gitc_manifest.paths[project.relpath].old_revision | ||
1689 | ): | ||
1690 | opened_projects.append(project.relpath) | ||
1691 | else: | ||
1692 | gitc_projects.append(project.relpath) | ||
1693 | |||
1694 | if not args: | ||
1695 | gitc_projects = None | ||
1696 | |||
1697 | if gitc_projects != [] and not opt.local_only: | ||
1698 | print( | ||
1699 | "Updating GITC client: %s" | ||
1700 | % self.gitc_manifest.gitc_client_name | ||
1701 | ) | ||
1702 | manifest = GitcManifest( | ||
1703 | self.repodir, self.gitc_manifest.gitc_client_name | ||
1704 | ) | ||
1705 | if manifest_name: | ||
1706 | manifest.Override(manifest_name) | ||
1707 | else: | ||
1708 | manifest.Override(manifest.manifestFile) | ||
1709 | gitc_utils.generate_gitc_manifest( | ||
1710 | self.gitc_manifest, manifest, gitc_projects | ||
1711 | ) | ||
1712 | print("GITC client successfully synced.") | ||
1713 | |||
1714 | # The opened projects need to be synced as normal, therefore we | ||
1715 | # generate a new args list to represent the opened projects. | ||
1716 | # TODO: make this more reliable -- if there's a project name/path | ||
1717 | # overlap, this may choose the wrong project. | ||
1718 | args = [ | ||
1719 | os.path.relpath(manifest.paths[path].worktree, os.getcwd()) | ||
1720 | for path in opened_projects | ||
1721 | ] | ||
1722 | if not args: | ||
1723 | return | ||
1724 | |||
1725 | all_projects = self.GetProjects( | 1679 | all_projects = self.GetProjects( |
1726 | args, | 1680 | args, |
1727 | missing_ok=True, | 1681 | missing_ok=True, |