diff options
| -rwxr-xr-x | main.py | 8 | ||||
| -rw-r--r-- | project.py | 12 | ||||
| -rw-r--r-- | subcmds/cherry_pick.py | 2 | ||||
| -rw-r--r-- | subcmds/manifest.py | 6 | ||||
| -rw-r--r-- | subcmds/rebase.py | 2 | ||||
| -rw-r--r-- | subcmds/sync.py | 2 | ||||
| -rw-r--r-- | subcmds/upload.py | 6 |
7 files changed, 20 insertions, 18 deletions
| @@ -566,9 +566,11 @@ repo: error: | |||
| 566 | sys.exit(1) | 566 | sys.exit(1) |
| 567 | 567 | ||
| 568 | if exp > ver: | 568 | if exp > ver: |
| 569 | logger.warn("\n... A new version of repo (%s) is available.", exp_str) | 569 | logger.warning( |
| 570 | "\n... A new version of repo (%s) is available.", exp_str | ||
| 571 | ) | ||
| 570 | if os.access(repo_path, os.W_OK): | 572 | if os.access(repo_path, os.W_OK): |
| 571 | logger.warn( | 573 | logger.warning( |
| 572 | """\ | 574 | """\ |
| 573 | ... You should upgrade soon: | 575 | ... You should upgrade soon: |
| 574 | cp %s %s | 576 | cp %s %s |
| @@ -577,7 +579,7 @@ repo: error: | |||
| 577 | repo_path, | 579 | repo_path, |
| 578 | ) | 580 | ) |
| 579 | else: | 581 | else: |
| 580 | logger.warn( | 582 | logger.warning( |
| 581 | """\ | 583 | """\ |
| 582 | ... New version is available at: %s | 584 | ... New version is available at: %s |
| 583 | ... The launcher is run from: %s | 585 | ... The launcher is run from: %s |
| @@ -1262,7 +1262,7 @@ class Project(object): | |||
| 1262 | try: | 1262 | try: |
| 1263 | platform_utils.remove(tarpath) | 1263 | platform_utils.remove(tarpath) |
| 1264 | except OSError as e: | 1264 | except OSError as e: |
| 1265 | logger.warn("warn: Cannot remove archive %s: %s", tarpath, e) | 1265 | logger.warning("warn: Cannot remove archive %s: %s", tarpath, e) |
| 1266 | self._CopyAndLinkFiles() | 1266 | self._CopyAndLinkFiles() |
| 1267 | return SyncNetworkHalfResult(True) | 1267 | return SyncNetworkHalfResult(True) |
| 1268 | 1268 | ||
| @@ -1759,7 +1759,7 @@ class Project(object): | |||
| 1759 | """ | 1759 | """ |
| 1760 | if self.IsDirty(): | 1760 | if self.IsDirty(): |
| 1761 | if force: | 1761 | if force: |
| 1762 | logger.warn( | 1762 | logger.warning( |
| 1763 | "warning: %s: Removing dirty project: uncommitted changes " | 1763 | "warning: %s: Removing dirty project: uncommitted changes " |
| 1764 | "lost.", | 1764 | "lost.", |
| 1765 | self.RelPath(local=False), | 1765 | self.RelPath(local=False), |
| @@ -3038,7 +3038,7 @@ class Project(object): | |||
| 3038 | # hardlink below. | 3038 | # hardlink below. |
| 3039 | if not filecmp.cmp(stock_hook, dst, shallow=False): | 3039 | if not filecmp.cmp(stock_hook, dst, shallow=False): |
| 3040 | if not quiet: | 3040 | if not quiet: |
| 3041 | logger.warn( | 3041 | logger.warning( |
| 3042 | "warn: %s: Not replacing locally modified %s hook", | 3042 | "warn: %s: Not replacing locally modified %s hook", |
| 3043 | self.RelPath(local=False), | 3043 | self.RelPath(local=False), |
| 3044 | name, | 3044 | name, |
| @@ -4336,7 +4336,7 @@ class ManifestProject(MetaProject): | |||
| 4336 | self.config.SetBoolean("repo.worktree", worktree) | 4336 | self.config.SetBoolean("repo.worktree", worktree) |
| 4337 | if is_new: | 4337 | if is_new: |
| 4338 | self.use_git_worktrees = True | 4338 | self.use_git_worktrees = True |
| 4339 | logger.warn("warning: --worktree is experimental!") | 4339 | logger.warning("warning: --worktree is experimental!") |
| 4340 | 4340 | ||
| 4341 | if archive: | 4341 | if archive: |
| 4342 | if is_new: | 4342 | if is_new: |
| @@ -4400,7 +4400,7 @@ class ManifestProject(MetaProject): | |||
| 4400 | 4400 | ||
| 4401 | self.config.SetBoolean("repo.git-lfs", git_lfs) | 4401 | self.config.SetBoolean("repo.git-lfs", git_lfs) |
| 4402 | if not is_new: | 4402 | if not is_new: |
| 4403 | logger.warn( | 4403 | logger.warning( |
| 4404 | "warning: Changing --git-lfs settings will only affect new " | 4404 | "warning: Changing --git-lfs settings will only affect new " |
| 4405 | "project checkouts.\n" | 4405 | "project checkouts.\n" |
| 4406 | " Existing projects will require manual updates.\n" | 4406 | " Existing projects will require manual updates.\n" |
| @@ -4512,7 +4512,7 @@ class ManifestProject(MetaProject): | |||
| 4512 | submanifest = "" | 4512 | submanifest = "" |
| 4513 | if self.manifest.path_prefix: | 4513 | if self.manifest.path_prefix: |
| 4514 | submanifest = f"for {self.manifest.path_prefix} " | 4514 | submanifest = f"for {self.manifest.path_prefix} " |
| 4515 | logger.warn( | 4515 | logger.warning( |
| 4516 | "warning: git update of superproject %s failed, " | 4516 | "warning: git update of superproject %s failed, " |
| 4517 | "repo sync will not use superproject to fetch source; " | 4517 | "repo sync will not use superproject to fetch source; " |
| 4518 | "while this error is not fatal, and you can continue to " | 4518 | "while this error is not fatal, and you can continue to " |
diff --git a/subcmds/cherry_pick.py b/subcmds/cherry_pick.py index f9ae3e32..3d219333 100644 --- a/subcmds/cherry_pick.py +++ b/subcmds/cherry_pick.py | |||
| @@ -86,7 +86,7 @@ change id will be added. | |||
| 86 | p.Wait() | 86 | p.Wait() |
| 87 | except GitError as e: | 87 | except GitError as e: |
| 88 | logger.error(e) | 88 | logger.error(e) |
| 89 | logger.warn( | 89 | logger.warning( |
| 90 | "NOTE: When committing (please see above) and editing the " | 90 | "NOTE: When committing (please see above) and editing the " |
| 91 | "commit message, please remove the old Change-Id-line and " | 91 | "commit message, please remove the old Change-Id-line and " |
| 92 | "add:\n%s", | 92 | "add:\n%s", |
diff --git a/subcmds/manifest.py b/subcmds/manifest.py index 101240d1..bb6dc930 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py | |||
| @@ -136,7 +136,7 @@ to indicate the remote ref to push changes to via 'repo upload'. | |||
| 136 | manifest.SetUseLocalManifests(not opt.ignore_local_manifests) | 136 | manifest.SetUseLocalManifests(not opt.ignore_local_manifests) |
| 137 | 137 | ||
| 138 | if opt.json: | 138 | if opt.json: |
| 139 | logger.warn("warning: --json is experimental!") | 139 | logger.warning("warning: --json is experimental!") |
| 140 | doc = manifest.ToDict( | 140 | doc = manifest.ToDict( |
| 141 | peg_rev=opt.peg_rev, | 141 | peg_rev=opt.peg_rev, |
| 142 | peg_rev_upstream=opt.peg_rev_upstream, | 142 | peg_rev_upstream=opt.peg_rev_upstream, |
| @@ -163,13 +163,13 @@ to indicate the remote ref to push changes to via 'repo upload'. | |||
| 163 | if output_file != "-": | 163 | if output_file != "-": |
| 164 | fd.close() | 164 | fd.close() |
| 165 | if manifest.path_prefix: | 165 | if manifest.path_prefix: |
| 166 | logger.warn( | 166 | logger.warning( |
| 167 | "Saved %s submanifest to %s", | 167 | "Saved %s submanifest to %s", |
| 168 | manifest.path_prefix, | 168 | manifest.path_prefix, |
| 169 | output_file, | 169 | output_file, |
| 170 | ) | 170 | ) |
| 171 | else: | 171 | else: |
| 172 | logger.warn("Saved manifest to %s", output_file) | 172 | logger.warning("Saved manifest to %s", output_file) |
| 173 | 173 | ||
| 174 | def ValidateOptions(self, opt, args): | 174 | def ValidateOptions(self, opt, args): |
| 175 | if args: | 175 | if args: |
diff --git a/subcmds/rebase.py b/subcmds/rebase.py index 439557c2..db1b387c 100644 --- a/subcmds/rebase.py +++ b/subcmds/rebase.py | |||
| @@ -113,7 +113,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 113 | ) | 113 | ) |
| 114 | 114 | ||
| 115 | if len(args) == 1: | 115 | if len(args) == 1: |
| 116 | logger.warn( | 116 | logger.warning( |
| 117 | "note: project %s is mapped to more than one path", args[0] | 117 | "note: project %s is mapped to more than one path", args[0] |
| 118 | ) | 118 | ) |
| 119 | 119 | ||
diff --git a/subcmds/sync.py b/subcmds/sync.py index 85428b18..e1f7d019 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -1877,7 +1877,7 @@ def _PostRepoUpgrade(manifest, quiet=False): | |||
| 1877 | 1877 | ||
| 1878 | def _PostRepoFetch(rp, repo_verify=True, verbose=False): | 1878 | def _PostRepoFetch(rp, repo_verify=True, verbose=False): |
| 1879 | if rp.HasChanges: | 1879 | if rp.HasChanges: |
| 1880 | logger.warn("info: A new version of repo is available") | 1880 | logger.warning("info: A new version of repo is available") |
| 1881 | wrapper = Wrapper() | 1881 | wrapper = Wrapper() |
| 1882 | try: | 1882 | try: |
| 1883 | rev = rp.bare_git.describe(rp.GetRevisionId()) | 1883 | rev = rp.bare_git.describe(rp.GetRevisionId()) |
diff --git a/subcmds/upload.py b/subcmds/upload.py index 618a10e1..4bcdfaf9 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -72,16 +72,16 @@ def _VerifyPendingCommits(branches: List[ReviewableBranch]) -> bool: | |||
| 72 | # If any branch has many commits, prompt the user. | 72 | # If any branch has many commits, prompt the user. |
| 73 | if many_commits: | 73 | if many_commits: |
| 74 | if len(branches) > 1: | 74 | if len(branches) > 1: |
| 75 | logger.warn( | 75 | logger.warning( |
| 76 | "ATTENTION: One or more branches has an unusually high number " | 76 | "ATTENTION: One or more branches has an unusually high number " |
| 77 | "of commits." | 77 | "of commits." |
| 78 | ) | 78 | ) |
| 79 | else: | 79 | else: |
| 80 | logger.warn( | 80 | logger.warning( |
| 81 | "ATTENTION: You are uploading an unusually high number of " | 81 | "ATTENTION: You are uploading an unusually high number of " |
| 82 | "commits." | 82 | "commits." |
| 83 | ) | 83 | ) |
| 84 | logger.warn( | 84 | logger.warning( |
| 85 | "YOU PROBABLY DO NOT MEAN TO DO THIS. (Did you rebase across " | 85 | "YOU PROBABLY DO NOT MEAN TO DO THIS. (Did you rebase across " |
| 86 | "branches?)" | 86 | "branches?)" |
| 87 | ) | 87 | ) |
