diff options
Diffstat (limited to 'subcmds/checkout.py')
-rw-r--r-- | subcmds/checkout.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/subcmds/checkout.py b/subcmds/checkout.py index 67f1838c..ea48263e 100644 --- a/subcmds/checkout.py +++ b/subcmds/checkout.py | |||
@@ -13,7 +13,6 @@ | |||
13 | # limitations under the License. | 13 | # limitations under the License. |
14 | 14 | ||
15 | import functools | 15 | import functools |
16 | import sys | ||
17 | from typing import NamedTuple | 16 | from typing import NamedTuple |
18 | 17 | ||
19 | from command import Command | 18 | from command import Command |
@@ -22,6 +21,10 @@ from error import GitError | |||
22 | from error import RepoExitError | 21 | from error import RepoExitError |
23 | from progress import Progress | 22 | from progress import Progress |
24 | from project import Project | 23 | from project import Project |
24 | from repo_logging import RepoLogger | ||
25 | |||
26 | |||
27 | logger = RepoLogger(__file__) | ||
25 | 28 | ||
26 | 29 | ||
27 | class CheckoutBranchResult(NamedTuple): | 30 | class CheckoutBranchResult(NamedTuple): |
@@ -99,12 +102,9 @@ The command is equivalent to: | |||
99 | 102 | ||
100 | if err_projects: | 103 | if err_projects: |
101 | for p in err_projects: | 104 | for p in err_projects: |
102 | print( | 105 | logger.error("error: %s/: cannot checkout %s", p.relpath, nb) |
103 | "error: %s/: cannot checkout %s" % (p.relpath, nb), | ||
104 | file=sys.stderr, | ||
105 | ) | ||
106 | raise CheckoutCommandError(aggregate_errors=err) | 106 | raise CheckoutCommandError(aggregate_errors=err) |
107 | elif not success: | 107 | elif not success: |
108 | msg = f"error: no project has branch {nb}" | 108 | msg = f"error: no project has branch {nb}" |
109 | print(msg, file=sys.stderr) | 109 | logger.error(msg) |
110 | raise MissingBranchError(msg) | 110 | raise MissingBranchError(msg) |