diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-03-06 00:46:19 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-03-06 00:46:20 +0000 |
| commit | 28db6ffef48138fc97aca9fbf0d774ac26a41c70 (patch) | |
| tree | d911fb72ec3de2c7af6af0dc21c2a43d72f64e8b | |
| parent | 45d21685b93f80b67239849b2d2cfe6b217e335a (diff) | |
| parent | 4eb285cf902a46c3c99bc2c999e486d7c218354b (diff) | |
| download | git-repo-28db6ffef48138fc97aca9fbf0d774ac26a41c70.tar.gz | |
Merge "Fix: local manifest deprecation warning appears more than once"
| -rw-r--r-- | manifest_xml.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 07f0c66a..50417c60 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
| @@ -94,6 +94,7 @@ class XmlManifest(object): | |||
| 94 | self.topdir = os.path.dirname(self.repodir) | 94 | self.topdir = os.path.dirname(self.repodir) |
| 95 | self.manifestFile = os.path.join(self.repodir, MANIFEST_FILE_NAME) | 95 | self.manifestFile = os.path.join(self.repodir, MANIFEST_FILE_NAME) |
| 96 | self.globalConfig = GitConfig.ForUser() | 96 | self.globalConfig = GitConfig.ForUser() |
| 97 | self.localManifestWarning = False | ||
| 97 | 98 | ||
| 98 | self.repoProject = MetaProject(self, 'repo', | 99 | self.repoProject = MetaProject(self, 'repo', |
| 99 | gitdir = os.path.join(repodir, 'repo/.git'), | 100 | gitdir = os.path.join(repodir, 'repo/.git'), |
| @@ -335,9 +336,11 @@ class XmlManifest(object): | |||
| 335 | 336 | ||
| 336 | local = os.path.join(self.repodir, LOCAL_MANIFEST_NAME) | 337 | local = os.path.join(self.repodir, LOCAL_MANIFEST_NAME) |
| 337 | if os.path.exists(local): | 338 | if os.path.exists(local): |
| 338 | print('warning: %s is deprecated; put local manifests in `%s` instead' | 339 | if not self.localManifestWarning: |
| 339 | % (LOCAL_MANIFEST_NAME, os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)), | 340 | self.localManifestWarning = True |
| 340 | file=sys.stderr) | 341 | print('warning: %s is deprecated; put local manifests in `%s` instead' |
| 342 | % (LOCAL_MANIFEST_NAME, os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)), | ||
| 343 | file=sys.stderr) | ||
| 341 | nodes.append(self._ParseManifestXml(local, self.repodir)) | 344 | nodes.append(self._ParseManifestXml(local, self.repodir)) |
| 342 | 345 | ||
| 343 | local_dir = os.path.abspath(os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)) | 346 | local_dir = os.path.abspath(os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)) |
