Update logger.warn to logger.warning

Bug: 305035810
Change-Id: Ic2b35d5c3cbe92480c24da612f29382f5d26d4aa
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389414
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This commit is contained in:
Aravind Vasudevan
2023-10-13 19:22:47 +00:00
committed by LUCI
parent 6a7f73bb9a
commit 8bc5000423
7 changed files with 20 additions and 18 deletions

View File

@@ -86,7 +86,7 @@ change id will be added.
p.Wait()
except GitError as e:
logger.error(e)
logger.warn(
logger.warning(
"NOTE: When committing (please see above) and editing the "
"commit message, please remove the old Change-Id-line and "
"add:\n%s",

View File

@@ -136,7 +136,7 @@ to indicate the remote ref to push changes to via 'repo upload'.
manifest.SetUseLocalManifests(not opt.ignore_local_manifests)
if opt.json:
logger.warn("warning: --json is experimental!")
logger.warning("warning: --json is experimental!")
doc = manifest.ToDict(
peg_rev=opt.peg_rev,
peg_rev_upstream=opt.peg_rev_upstream,
@@ -163,13 +163,13 @@ to indicate the remote ref to push changes to via 'repo upload'.
if output_file != "-":
fd.close()
if manifest.path_prefix:
logger.warn(
logger.warning(
"Saved %s submanifest to %s",
manifest.path_prefix,
output_file,
)
else:
logger.warn("Saved manifest to %s", output_file)
logger.warning("Saved manifest to %s", output_file)
def ValidateOptions(self, opt, args):
if args:

View File

@@ -113,7 +113,7 @@ branch but need to incorporate new upstream changes "underneath" them.
)
if len(args) == 1:
logger.warn(
logger.warning(
"note: project %s is mapped to more than one path", args[0]
)

View File

@@ -1877,7 +1877,7 @@ def _PostRepoUpgrade(manifest, quiet=False):
def _PostRepoFetch(rp, repo_verify=True, verbose=False):
if rp.HasChanges:
logger.warn("info: A new version of repo is available")
logger.warning("info: A new version of repo is available")
wrapper = Wrapper()
try:
rev = rp.bare_git.describe(rp.GetRevisionId())

View File

@@ -72,16 +72,16 @@ def _VerifyPendingCommits(branches: List[ReviewableBranch]) -> bool:
# If any branch has many commits, prompt the user.
if many_commits:
if len(branches) > 1:
logger.warn(
logger.warning(
"ATTENTION: One or more branches has an unusually high number "
"of commits."
)
else:
logger.warn(
logger.warning(
"ATTENTION: You are uploading an unusually high number of "
"commits."
)
logger.warn(
logger.warning(
"YOU PROBABLY DO NOT MEAN TO DO THIS. (Did you rebase across "
"branches?)"
)