diff options
author | Aravind Vasudevan <aravindvasudev@google.com> | 2023-09-14 08:46:44 +0000 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-09-14 17:13:37 +0000 |
commit | c993c5068e0f7e22124b1bfb17ad0425fe2b8c83 (patch) | |
tree | 7e1dadd9b04a42ebfd438e41f35c176f0f0578da /subcmds/rebase.py | |
parent | c3d7c8536c408a54c7af1486f0beec7a1b0eb0ad (diff) | |
download | git-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/rebase.py')
-rw-r--r-- | subcmds/rebase.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/subcmds/rebase.py b/subcmds/rebase.py index c0e83adf..439557c2 100644 --- a/subcmds/rebase.py +++ b/subcmds/rebase.py | |||
@@ -17,6 +17,10 @@ import sys | |||
17 | from color import Coloring | 17 | from color import Coloring |
18 | from command import Command | 18 | from command import Command |
19 | from git_command import GitCommand | 19 | from git_command import GitCommand |
20 | from repo_logging import RepoLogger | ||
21 | |||
22 | |||
23 | logger = RepoLogger(__file__) | ||
20 | 24 | ||
21 | 25 | ||
22 | class RebaseColoring(Coloring): | 26 | class RebaseColoring(Coloring): |
@@ -104,17 +108,15 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
104 | one_project = len(all_projects) == 1 | 108 | one_project = len(all_projects) == 1 |
105 | 109 | ||
106 | if opt.interactive and not one_project: | 110 | if opt.interactive and not one_project: |
107 | print( | 111 | logger.error( |
108 | "error: interactive rebase not supported with multiple " | 112 | "error: interactive rebase not supported with multiple projects" |
109 | "projects", | ||
110 | file=sys.stderr, | ||
111 | ) | 113 | ) |
114 | |||
112 | if len(args) == 1: | 115 | if len(args) == 1: |
113 | print( | 116 | logger.warn( |
114 | "note: project %s is mapped to more than one path" | 117 | "note: project %s is mapped to more than one path", args[0] |
115 | % (args[0],), | ||
116 | file=sys.stderr, | ||
117 | ) | 118 | ) |
119 | |||
118 | return 1 | 120 | return 1 |
119 | 121 | ||
120 | # Setup the common git rebase args that we use for all projects. | 122 | # Setup the common git rebase args that we use for all projects. |
@@ -145,10 +147,9 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
145 | cb = project.CurrentBranch | 147 | cb = project.CurrentBranch |
146 | if not cb: | 148 | if not cb: |
147 | if one_project: | 149 | if one_project: |
148 | print( | 150 | logger.error( |
149 | "error: project %s has a detached HEAD" | 151 | "error: project %s has a detached HEAD", |
150 | % _RelPath(project), | 152 | _RelPath(project), |
151 | file=sys.stderr, | ||
152 | ) | 153 | ) |
153 | return 1 | 154 | return 1 |
154 | # Ignore branches with detached HEADs. | 155 | # Ignore branches with detached HEADs. |
@@ -157,10 +158,9 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
157 | upbranch = project.GetBranch(cb) | 158 | upbranch = project.GetBranch(cb) |
158 | if not upbranch.LocalMerge: | 159 | if not upbranch.LocalMerge: |
159 | if one_project: | 160 | if one_project: |
160 | print( | 161 | logger.error( |
161 | "error: project %s does not track any remote branches" | 162 | "error: project %s does not track any remote branches", |
162 | % _RelPath(project), | 163 | _RelPath(project), |
163 | file=sys.stderr, | ||
164 | ) | 164 | ) |
165 | return 1 | 165 | return 1 |
166 | # Ignore branches without remotes. | 166 | # Ignore branches without remotes. |