diff options
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 9df03c06..fd0e4f12 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -140,12 +140,12 @@ class XmlManifest(object): | |||
140 | self._load_local_manifests = True | 140 | self._load_local_manifests = True |
141 | 141 | ||
142 | self.repoProject = MetaProject(self, 'repo', | 142 | self.repoProject = MetaProject(self, 'repo', |
143 | gitdir=os.path.join(repodir, 'repo/.git'), | 143 | gitdir=os.path.join(repodir, 'repo/.git'), |
144 | worktree=os.path.join(repodir, 'repo')) | 144 | worktree=os.path.join(repodir, 'repo')) |
145 | 145 | ||
146 | self.manifestProject = MetaProject(self, 'manifests', | 146 | self.manifestProject = MetaProject(self, 'manifests', |
147 | gitdir=os.path.join(repodir, 'manifests.git'), | 147 | gitdir=os.path.join(repodir, 'manifests.git'), |
148 | worktree=os.path.join(repodir, 'manifests')) | 148 | worktree=os.path.join(repodir, 'manifests')) |
149 | 149 | ||
150 | self._Unload() | 150 | self._Unload() |
151 | 151 | ||
@@ -462,12 +462,12 @@ class XmlManifest(object): | |||
462 | self.localManifestWarning = True | 462 | self.localManifestWarning = True |
463 | print('warning: %s is deprecated; put local manifests ' | 463 | print('warning: %s is deprecated; put local manifests ' |
464 | 'in `%s` instead' % (LOCAL_MANIFEST_NAME, | 464 | 'in `%s` instead' % (LOCAL_MANIFEST_NAME, |
465 | os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)), | 465 | os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)), |
466 | file=sys.stderr) | 466 | file=sys.stderr) |
467 | nodes.append(self._ParseManifestXml(local, self.repodir)) | 467 | nodes.append(self._ParseManifestXml(local, self.repodir)) |
468 | 468 | ||
469 | local_dir = os.path.abspath(os.path.join(self.repodir, | 469 | local_dir = os.path.abspath(os.path.join(self.repodir, |
470 | LOCAL_MANIFESTS_DIR_NAME)) | 470 | LOCAL_MANIFESTS_DIR_NAME)) |
471 | try: | 471 | try: |
472 | for local_file in sorted(platform_utils.listdir(local_dir)): | 472 | for local_file in sorted(platform_utils.listdir(local_dir)): |
473 | if local_file.endswith('.xml'): | 473 | if local_file.endswith('.xml'): |
@@ -512,7 +512,7 @@ class XmlManifest(object): | |||
512 | fp = os.path.join(include_root, name) | 512 | fp = os.path.join(include_root, name) |
513 | if not os.path.isfile(fp): | 513 | if not os.path.isfile(fp): |
514 | raise ManifestParseError("include %s doesn't exist or isn't a file" | 514 | raise ManifestParseError("include %s doesn't exist or isn't a file" |
515 | % (name,)) | 515 | % (name,)) |
516 | try: | 516 | try: |
517 | nodes.extend(self._ParseManifestXml(fp, include_root)) | 517 | nodes.extend(self._ParseManifestXml(fp, include_root)) |
518 | # should isolate this to the exact exception, but that's | 518 | # should isolate this to the exact exception, but that's |
@@ -811,21 +811,21 @@ class XmlManifest(object): | |||
811 | remote = self._default.remote | 811 | remote = self._default.remote |
812 | if remote is None: | 812 | if remote is None: |
813 | raise ManifestParseError("no remote for project %s within %s" % | 813 | raise ManifestParseError("no remote for project %s within %s" % |
814 | (name, self.manifestFile)) | 814 | (name, self.manifestFile)) |
815 | 815 | ||
816 | revisionExpr = node.getAttribute('revision') or remote.revision | 816 | revisionExpr = node.getAttribute('revision') or remote.revision |
817 | if not revisionExpr: | 817 | if not revisionExpr: |
818 | revisionExpr = self._default.revisionExpr | 818 | revisionExpr = self._default.revisionExpr |
819 | if not revisionExpr: | 819 | if not revisionExpr: |
820 | raise ManifestParseError("no revision for project %s within %s" % | 820 | raise ManifestParseError("no revision for project %s within %s" % |
821 | (name, self.manifestFile)) | 821 | (name, self.manifestFile)) |
822 | 822 | ||
823 | path = node.getAttribute('path') | 823 | path = node.getAttribute('path') |
824 | if not path: | 824 | if not path: |
825 | path = name | 825 | path = name |
826 | if path.startswith('/'): | 826 | if path.startswith('/'): |
827 | raise ManifestParseError("project %s path cannot be absolute in %s" % | 827 | raise ManifestParseError("project %s path cannot be absolute in %s" % |
828 | (name, self.manifestFile)) | 828 | (name, self.manifestFile)) |
829 | 829 | ||
830 | rebase = node.getAttribute('rebase') | 830 | rebase = node.getAttribute('rebase') |
831 | if not rebase: | 831 | if not rebase: |
@@ -1054,7 +1054,7 @@ class XmlManifest(object): | |||
1054 | keep = "true" | 1054 | keep = "true" |
1055 | if keep != "true" and keep != "false": | 1055 | if keep != "true" and keep != "false": |
1056 | raise ManifestParseError('optional "keep" attribute must be ' | 1056 | raise ManifestParseError('optional "keep" attribute must be ' |
1057 | '"true" or "false"') | 1057 | '"true" or "false"') |
1058 | project.AddAnnotation(name, value, keep) | 1058 | project.AddAnnotation(name, value, keep) |
1059 | 1059 | ||
1060 | def _get_remote(self, node): | 1060 | def _get_remote(self, node): |
@@ -1065,7 +1065,7 @@ class XmlManifest(object): | |||
1065 | v = self._remotes.get(name) | 1065 | v = self._remotes.get(name) |
1066 | if not v: | 1066 | if not v: |
1067 | raise ManifestParseError("remote %s not defined in %s" % | 1067 | raise ManifestParseError("remote %s not defined in %s" % |
1068 | (name, self.manifestFile)) | 1068 | (name, self.manifestFile)) |
1069 | return v | 1069 | return v |
1070 | 1070 | ||
1071 | def _reqatt(self, node, attname): | 1071 | def _reqatt(self, node, attname): |
@@ -1075,7 +1075,7 @@ class XmlManifest(object): | |||
1075 | v = node.getAttribute(attname) | 1075 | v = node.getAttribute(attname) |
1076 | if not v: | 1076 | if not v: |
1077 | raise ManifestParseError("no %s in <%s> within %s" % | 1077 | raise ManifestParseError("no %s in <%s> within %s" % |
1078 | (attname, node.nodeName, self.manifestFile)) | 1078 | (attname, node.nodeName, self.manifestFile)) |
1079 | return v | 1079 | return v |
1080 | 1080 | ||
1081 | def projectsDiff(self, manifest): | 1081 | def projectsDiff(self, manifest): |