mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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:
parent
6a7f73bb9a
commit
8bc5000423
8
main.py
8
main.py
@ -566,9 +566,11 @@ repo: error:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if exp > ver:
|
if exp > ver:
|
||||||
logger.warn("\n... A new version of repo (%s) is available.", exp_str)
|
logger.warning(
|
||||||
|
"\n... A new version of repo (%s) is available.", exp_str
|
||||||
|
)
|
||||||
if os.access(repo_path, os.W_OK):
|
if os.access(repo_path, os.W_OK):
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"""\
|
"""\
|
||||||
... You should upgrade soon:
|
... You should upgrade soon:
|
||||||
cp %s %s
|
cp %s %s
|
||||||
@ -577,7 +579,7 @@ repo: error:
|
|||||||
repo_path,
|
repo_path,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"""\
|
"""\
|
||||||
... New version is available at: %s
|
... New version is available at: %s
|
||||||
... The launcher is run from: %s
|
... The launcher is run from: %s
|
||||||
|
12
project.py
12
project.py
@ -1262,7 +1262,7 @@ class Project(object):
|
|||||||
try:
|
try:
|
||||||
platform_utils.remove(tarpath)
|
platform_utils.remove(tarpath)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
logger.warn("warn: Cannot remove archive %s: %s", tarpath, e)
|
logger.warning("warn: Cannot remove archive %s: %s", tarpath, e)
|
||||||
self._CopyAndLinkFiles()
|
self._CopyAndLinkFiles()
|
||||||
return SyncNetworkHalfResult(True)
|
return SyncNetworkHalfResult(True)
|
||||||
|
|
||||||
@ -1759,7 +1759,7 @@ class Project(object):
|
|||||||
"""
|
"""
|
||||||
if self.IsDirty():
|
if self.IsDirty():
|
||||||
if force:
|
if force:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"warning: %s: Removing dirty project: uncommitted changes "
|
"warning: %s: Removing dirty project: uncommitted changes "
|
||||||
"lost.",
|
"lost.",
|
||||||
self.RelPath(local=False),
|
self.RelPath(local=False),
|
||||||
@ -3038,7 +3038,7 @@ class Project(object):
|
|||||||
# hardlink below.
|
# hardlink below.
|
||||||
if not filecmp.cmp(stock_hook, dst, shallow=False):
|
if not filecmp.cmp(stock_hook, dst, shallow=False):
|
||||||
if not quiet:
|
if not quiet:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"warn: %s: Not replacing locally modified %s hook",
|
"warn: %s: Not replacing locally modified %s hook",
|
||||||
self.RelPath(local=False),
|
self.RelPath(local=False),
|
||||||
name,
|
name,
|
||||||
@ -4336,7 +4336,7 @@ class ManifestProject(MetaProject):
|
|||||||
self.config.SetBoolean("repo.worktree", worktree)
|
self.config.SetBoolean("repo.worktree", worktree)
|
||||||
if is_new:
|
if is_new:
|
||||||
self.use_git_worktrees = True
|
self.use_git_worktrees = True
|
||||||
logger.warn("warning: --worktree is experimental!")
|
logger.warning("warning: --worktree is experimental!")
|
||||||
|
|
||||||
if archive:
|
if archive:
|
||||||
if is_new:
|
if is_new:
|
||||||
@ -4400,7 +4400,7 @@ class ManifestProject(MetaProject):
|
|||||||
|
|
||||||
self.config.SetBoolean("repo.git-lfs", git_lfs)
|
self.config.SetBoolean("repo.git-lfs", git_lfs)
|
||||||
if not is_new:
|
if not is_new:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"warning: Changing --git-lfs settings will only affect new "
|
"warning: Changing --git-lfs settings will only affect new "
|
||||||
"project checkouts.\n"
|
"project checkouts.\n"
|
||||||
" Existing projects will require manual updates.\n"
|
" Existing projects will require manual updates.\n"
|
||||||
@ -4512,7 +4512,7 @@ class ManifestProject(MetaProject):
|
|||||||
submanifest = ""
|
submanifest = ""
|
||||||
if self.manifest.path_prefix:
|
if self.manifest.path_prefix:
|
||||||
submanifest = f"for {self.manifest.path_prefix} "
|
submanifest = f"for {self.manifest.path_prefix} "
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"warning: git update of superproject %s failed, "
|
"warning: git update of superproject %s failed, "
|
||||||
"repo sync will not use superproject to fetch source; "
|
"repo sync will not use superproject to fetch source; "
|
||||||
"while this error is not fatal, and you can continue to "
|
"while this error is not fatal, and you can continue to "
|
||||||
|
@ -86,7 +86,7 @@ change id will be added.
|
|||||||
p.Wait()
|
p.Wait()
|
||||||
except GitError as e:
|
except GitError as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"NOTE: When committing (please see above) and editing the "
|
"NOTE: When committing (please see above) and editing the "
|
||||||
"commit message, please remove the old Change-Id-line and "
|
"commit message, please remove the old Change-Id-line and "
|
||||||
"add:\n%s",
|
"add:\n%s",
|
||||||
|
@ -136,7 +136,7 @@ to indicate the remote ref to push changes to via 'repo upload'.
|
|||||||
manifest.SetUseLocalManifests(not opt.ignore_local_manifests)
|
manifest.SetUseLocalManifests(not opt.ignore_local_manifests)
|
||||||
|
|
||||||
if opt.json:
|
if opt.json:
|
||||||
logger.warn("warning: --json is experimental!")
|
logger.warning("warning: --json is experimental!")
|
||||||
doc = manifest.ToDict(
|
doc = manifest.ToDict(
|
||||||
peg_rev=opt.peg_rev,
|
peg_rev=opt.peg_rev,
|
||||||
peg_rev_upstream=opt.peg_rev_upstream,
|
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 != "-":
|
if output_file != "-":
|
||||||
fd.close()
|
fd.close()
|
||||||
if manifest.path_prefix:
|
if manifest.path_prefix:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"Saved %s submanifest to %s",
|
"Saved %s submanifest to %s",
|
||||||
manifest.path_prefix,
|
manifest.path_prefix,
|
||||||
output_file,
|
output_file,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
logger.warn("Saved manifest to %s", output_file)
|
logger.warning("Saved manifest to %s", output_file)
|
||||||
|
|
||||||
def ValidateOptions(self, opt, args):
|
def ValidateOptions(self, opt, args):
|
||||||
if args:
|
if args:
|
||||||
|
@ -113,7 +113,7 @@ branch but need to incorporate new upstream changes "underneath" them.
|
|||||||
)
|
)
|
||||||
|
|
||||||
if len(args) == 1:
|
if len(args) == 1:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"note: project %s is mapped to more than one path", args[0]
|
"note: project %s is mapped to more than one path", args[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1877,7 +1877,7 @@ def _PostRepoUpgrade(manifest, quiet=False):
|
|||||||
|
|
||||||
def _PostRepoFetch(rp, repo_verify=True, verbose=False):
|
def _PostRepoFetch(rp, repo_verify=True, verbose=False):
|
||||||
if rp.HasChanges:
|
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()
|
wrapper = Wrapper()
|
||||||
try:
|
try:
|
||||||
rev = rp.bare_git.describe(rp.GetRevisionId())
|
rev = rp.bare_git.describe(rp.GetRevisionId())
|
||||||
|
@ -72,16 +72,16 @@ def _VerifyPendingCommits(branches: List[ReviewableBranch]) -> bool:
|
|||||||
# If any branch has many commits, prompt the user.
|
# If any branch has many commits, prompt the user.
|
||||||
if many_commits:
|
if many_commits:
|
||||||
if len(branches) > 1:
|
if len(branches) > 1:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"ATTENTION: One or more branches has an unusually high number "
|
"ATTENTION: One or more branches has an unusually high number "
|
||||||
"of commits."
|
"of commits."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"ATTENTION: You are uploading an unusually high number of "
|
"ATTENTION: You are uploading an unusually high number of "
|
||||||
"commits."
|
"commits."
|
||||||
)
|
)
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"YOU PROBABLY DO NOT MEAN TO DO THIS. (Did you rebase across "
|
"YOU PROBABLY DO NOT MEAN TO DO THIS. (Did you rebase across "
|
||||||
"branches?)"
|
"branches?)"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user