summaryrefslogtreecommitdiffstats
path: root/subcmds/manifest.py
diff options
context:
space:
mode:
authorAravind Vasudevan <aravindvasudev@google.com>2023-09-14 08:46:44 +0000
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-09-14 17:13:37 +0000
commitc993c5068e0f7e22124b1bfb17ad0425fe2b8c83 (patch)
tree7e1dadd9b04a42ebfd438e41f35c176f0f0578da /subcmds/manifest.py
parentc3d7c8536c408a54c7af1486f0beec7a1b0eb0ad (diff)
downloadgit-repo-c993c5068e0f7e22124b1bfb17ad0425fe2b8c83.tar.gz
subcmds: Use repo logger
Bug: b/292704435 Change-Id: Ia3a45d87fc0bf0d4a1ba53050d9c3cd2dba20e55 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386236 Reviewed-by: Jason Chang <jasonnc@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com> Tested-by: Aravind Vasudevan <aravindvasudev@google.com>
Diffstat (limited to 'subcmds/manifest.py')
-rw-r--r--subcmds/manifest.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/subcmds/manifest.py b/subcmds/manifest.py
index f72df348..101240d1 100644
--- a/subcmds/manifest.py
+++ b/subcmds/manifest.py
@@ -17,6 +17,10 @@ import os
17import sys 17import sys
18 18
19from command import PagedCommand 19from command import PagedCommand
20from repo_logging import RepoLogger
21
22
23logger = RepoLogger(__file__)
20 24
21 25
22class Manifest(PagedCommand): 26class Manifest(PagedCommand):
@@ -132,7 +136,7 @@ to indicate the remote ref to push changes to via 'repo upload'.
132 manifest.SetUseLocalManifests(not opt.ignore_local_manifests) 136 manifest.SetUseLocalManifests(not opt.ignore_local_manifests)
133 137
134 if opt.json: 138 if opt.json:
135 print("warning: --json is experimental!", file=sys.stderr) 139 logger.warn("warning: --json is experimental!")
136 doc = manifest.ToDict( 140 doc = manifest.ToDict(
137 peg_rev=opt.peg_rev, 141 peg_rev=opt.peg_rev,
138 peg_rev_upstream=opt.peg_rev_upstream, 142 peg_rev_upstream=opt.peg_rev_upstream,
@@ -159,13 +163,13 @@ to indicate the remote ref to push changes to via 'repo upload'.
159 if output_file != "-": 163 if output_file != "-":
160 fd.close() 164 fd.close()
161 if manifest.path_prefix: 165 if manifest.path_prefix:
162 print( 166 logger.warn(
163 f"Saved {manifest.path_prefix} submanifest to " 167 "Saved %s submanifest to %s",
164 f"{output_file}", 168 manifest.path_prefix,
165 file=sys.stderr, 169 output_file,
166 ) 170 )
167 else: 171 else:
168 print(f"Saved manifest to {output_file}", file=sys.stderr) 172 logger.warn("Saved manifest to %s", output_file)
169 173
170 def ValidateOptions(self, opt, args): 174 def ValidateOptions(self, opt, args):
171 if args: 175 if args: