diff options
author | Simran Basi <sbasi@google.com> | 2015-08-20 12:19:28 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2015-08-28 10:53:05 -0700 |
commit | b9a1b73425773dc97843f92aeee9c57c9a08c0f7 (patch) | |
tree | 592a3655e92af8c7265ba07e29ba35aa1a1a36a8 /main.py | |
parent | dc2545cad60d7e8bae894f5d60eaeb3cff7485ae (diff) | |
download | git-repo-b9a1b73425773dc97843f92aeee9c57c9a08c0f7.tar.gz |
GITC: Add repo start support.
Add repo start support for GITC checkouts. If the user is in
the GITC FS view, they can now run repo start to check out
the sources and create a new working branch.
When "repo start" is called on a GITC project, the revision
tag is set to an empty string and saved in a new tag:
old-revision. This tells the GITC filesystem to display the
local copy of the sources when being viewed. The local copy
is created by pulling the project sources and the new branch
is created based off the original project revision.
Updated main.py to setup each command's gitc_manifest when
appropriate.
Updated repo sync's logic to sync opened projects and
updating the GITC manifest file for the rest.
Change-Id: I7e4809d1c4fc43c69b26f2f1bebe45aab0cae628
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -51,7 +51,8 @@ from error import ManifestParseError | |||
51 | from error import NoManifestException | 51 | from error import NoManifestException |
52 | from error import NoSuchProjectError | 52 | from error import NoSuchProjectError |
53 | from error import RepoChangedException | 53 | from error import RepoChangedException |
54 | from manifest_xml import XmlManifest | 54 | import gitc_utils |
55 | from manifest_xml import GitcManifest, XmlManifest | ||
55 | from pager import RunPager | 56 | from pager import RunPager |
56 | from wrapper import WrapperPath, Wrapper | 57 | from wrapper import WrapperPath, Wrapper |
57 | 58 | ||
@@ -129,6 +130,12 @@ class _Repo(object): | |||
129 | 130 | ||
130 | cmd.repodir = self.repodir | 131 | cmd.repodir = self.repodir |
131 | cmd.manifest = XmlManifest(cmd.repodir) | 132 | cmd.manifest = XmlManifest(cmd.repodir) |
133 | cmd.gitc_manifest = None | ||
134 | gitc_client_name = gitc_utils.parse_clientdir(os.getcwd()) | ||
135 | if gitc_client_name: | ||
136 | cmd.gitc_manifest = GitcManifest(cmd.repodir, gitc_client_name) | ||
137 | cmd.manifest.isGitcClient = True | ||
138 | |||
132 | Editor.globalConfig = cmd.manifest.globalConfig | 139 | Editor.globalConfig = cmd.manifest.globalConfig |
133 | 140 | ||
134 | if not isinstance(cmd, MirrorSafeCommand) and cmd.manifest.IsMirror: | 141 | if not isinstance(cmd, MirrorSafeCommand) and cmd.manifest.IsMirror: |