From 4e1fc1013c9203d3f5e7bdfba909d175a522c1f3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 6 Sep 2020 14:42:47 -0400 Subject: [PATCH] manifest: drop support for local_manifest.xml We deprecated this 8 years ago. Time to drop it to simplify the code as it'll help with refactoring in this module to not migrate it. Change-Id: I2deae5496d1f66a4491408fcdc95cd527062f8b6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/280798 Tested-by: Mike Frysinger Reviewed-by: Michael Mortensen --- docs/manifest-format.md | 8 +------- manifest_xml.py | 16 ++++++---------- subcmds/manifest.py | 2 +- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/docs/manifest-format.md b/docs/manifest-format.md index b439dcb7..676e031d 100644 --- a/docs/manifest-format.md +++ b/docs/manifest-format.md @@ -396,10 +396,4 @@ these extra projects. Manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml` will be loaded in alphabetical order. -Additional remotes and projects may also be added through a local -manifest, stored in `$TOP_DIR/.repo/local_manifest.xml`. This method -is deprecated in favor of using multiple manifest files as mentioned -above. - -If `$TOP_DIR/.repo/local_manifest.xml` exists, it will be loaded before -any manifest files stored in `$TOP_DIR/.repo/local_manifests/*.xml`. +The legacy `$TOP_DIR/.repo/local_manifest.xml` path is no longer supported. diff --git a/manifest_xml.py b/manifest_xml.py index f546045a..f2d04df2 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -192,7 +192,6 @@ class XmlManifest(object): self.topdir = os.path.dirname(self.repodir) self.manifestFile = os.path.join(self.repodir, MANIFEST_FILE_NAME) self.globalConfig = GitConfig.ForUser() - self.localManifestWarning = False self.isGitcClient = False self._load_local_manifests = True @@ -555,15 +554,12 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md self.manifestProject.worktree)) if self._load_local_manifests: - local = os.path.join(self.repodir, LOCAL_MANIFEST_NAME) - if os.path.exists(local): - if not self.localManifestWarning: - self.localManifestWarning = True - print('warning: %s is deprecated; put local manifests ' - 'in `%s` instead' % (LOCAL_MANIFEST_NAME, - os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)), - file=sys.stderr) - nodes.append(self._ParseManifestXml(local, self.repodir)) + if os.path.exists(os.path.join(self.repodir, LOCAL_MANIFEST_NAME)): + print('error: %s is not supported; put local manifests in `%s`' + 'instead' % (LOCAL_MANIFEST_NAME, + os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)), + file=sys.stderr) + sys.exit(1) local_dir = os.path.abspath(os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)) diff --git a/subcmds/manifest.py b/subcmds/manifest.py index fb020d8c..f0a0d069 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py @@ -30,7 +30,7 @@ class Manifest(PagedCommand): _helpDescription = """ With the -o option, exports the current manifest for inspection. -The manifest and (if present) local_manifest.xml are combined +The manifest and (if present) local_manifests/ are combined together to produce a single manifest file. This file can be stored in a Git repository for use during future 'repo init' invocations.