Explorar el Código

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>
Shawn O. Pearce hace 17 años
padre
commit
c8a300f639
Se han modificado 3 ficheros con 4 adiciones y 4 borrados
  1. 2 2
      main.py
  2. 1 1
      manifest_xml.py
  3. 1 1
      repo

+ 2 - 2
main.py

@@ -36,7 +36,7 @@ from editor import Editor
 from error import ManifestInvalidRevisionError
 from error import ManifestInvalidRevisionError
 from error import NoSuchProjectError
 from error import NoSuchProjectError
 from error import RepoChangedException
 from error import RepoChangedException
-from manifest import Manifest
+from manifest_xml import XmlManifest
 from pager import RunPager
 from pager import RunPager
 
 
 from subcmds import all as all_commands
 from subcmds import all as all_commands
@@ -97,7 +97,7 @@ class _Repo(object):
       sys.exit(1)
       sys.exit(1)
 
 
     cmd.repodir = self.repodir
     cmd.repodir = self.repodir
-    cmd.manifest = Manifest(cmd.repodir)
+    cmd.manifest = XmlManifest(cmd.repodir)
     Editor.globalConfig = cmd.manifest.globalConfig
     Editor.globalConfig = cmd.manifest.globalConfig
 
 
     if not isinstance(cmd, MirrorSafeCommand) and cmd.manifest.IsMirror:
     if not isinstance(cmd, MirrorSafeCommand) and cmd.manifest.IsMirror:

+ 1 - 1
manifest.py → manifest_xml.py

@@ -32,7 +32,7 @@ class _Default(object):
   remote = None
   remote = None
 
 
 
 
-class Manifest(object):
+class XmlManifest(object):
   """manages the repo configuration file"""
   """manages the repo configuration file"""
 
 
   def __init__(self, repodir):
   def __init__(self, repodir):

+ 1 - 1
repo

@@ -505,7 +505,7 @@ def _RunSelf(wrapper_path):
   my_git = os.path.join(my_dir, '.git')
   my_git = os.path.join(my_dir, '.git')
 
 
   if os.path.isfile(my_main) and os.path.isdir(my_git):
   if os.path.isfile(my_main) and os.path.isdir(my_git):
-    for name in ['manifest.py',
+    for name in ['git_config.py',
                  'project.py',
                  'project.py',
                  'subcmds']:
                  'subcmds']:
       if not os.path.exists(os.path.join(my_dir, name)):
       if not os.path.exists(os.path.join(my_dir, name)):