diff options
author | Shawn O. Pearce <sop@google.com> | 2009-05-18 13:19:57 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-05-29 09:31:28 -0700 |
commit | c8a300f6397dad7db00c3654ff6e50e9519ed7c9 (patch) | |
tree | 4bd29d3d580e53965b66ed2d10e13507584fe577 | |
parent | 1b34c9118ed86a15b0bc1094804c095dd7be33cb (diff) | |
download | git-repo-c8a300f6397dad7db00c3654ff6e50e9519ed7c9.tar.gz |
Refactor Manifest to be XmlManifest
We'll soon be supporting two different manifest formats, but we
can't immediately remove support for the current XML one that is
in wide spread use within Android.
Signed-off-by: Shawn O. Pearce <sop@google.com>
-rwxr-xr-x | main.py | 4 | ||||
-rw-r--r-- | manifest_xml.py (renamed from manifest.py) | 2 | ||||
-rwxr-xr-x | repo | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -36,7 +36,7 @@ from editor import Editor | |||
36 | from error import ManifestInvalidRevisionError | 36 | from error import ManifestInvalidRevisionError |
37 | from error import NoSuchProjectError | 37 | from error import NoSuchProjectError |
38 | from error import RepoChangedException | 38 | from error import RepoChangedException |
39 | from manifest import Manifest | 39 | from manifest_xml import XmlManifest |
40 | from pager import RunPager | 40 | from pager import RunPager |
41 | 41 | ||
42 | from subcmds import all as all_commands | 42 | from subcmds import all as all_commands |
@@ -97,7 +97,7 @@ class _Repo(object): | |||
97 | sys.exit(1) | 97 | sys.exit(1) |
98 | 98 | ||
99 | cmd.repodir = self.repodir | 99 | cmd.repodir = self.repodir |
100 | cmd.manifest = Manifest(cmd.repodir) | 100 | cmd.manifest = XmlManifest(cmd.repodir) |
101 | Editor.globalConfig = cmd.manifest.globalConfig | 101 | Editor.globalConfig = cmd.manifest.globalConfig |
102 | 102 | ||
103 | if not isinstance(cmd, MirrorSafeCommand) and cmd.manifest.IsMirror: | 103 | if not isinstance(cmd, MirrorSafeCommand) and cmd.manifest.IsMirror: |
diff --git a/manifest.py b/manifest_xml.py index e7a5afba..46976538 100644 --- a/manifest.py +++ b/manifest_xml.py | |||
@@ -32,7 +32,7 @@ class _Default(object): | |||
32 | remote = None | 32 | remote = None |
33 | 33 | ||
34 | 34 | ||
35 | class Manifest(object): | 35 | class XmlManifest(object): |
36 | """manages the repo configuration file""" | 36 | """manages the repo configuration file""" |
37 | 37 | ||
38 | def __init__(self, repodir): | 38 | def __init__(self, repodir): |
@@ -505,7 +505,7 @@ def _RunSelf(wrapper_path): | |||
505 | my_git = os.path.join(my_dir, '.git') | 505 | my_git = os.path.join(my_dir, '.git') |
506 | 506 | ||
507 | if os.path.isfile(my_main) and os.path.isdir(my_git): | 507 | if os.path.isfile(my_main) and os.path.isdir(my_git): |
508 | for name in ['manifest.py', | 508 | for name in ['git_config.py', |
509 | 'project.py', | 509 | 'project.py', |
510 | 'subcmds']: | 510 | 'subcmds']: |
511 | if not os.path.exists(os.path.join(my_dir, name)): | 511 | if not os.path.exists(os.path.join(my_dir, name)): |