diff options
Diffstat (limited to 'subcmds/grep.py')
| -rw-r--r-- | subcmds/grep.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/subcmds/grep.py b/subcmds/grep.py index 19c06d4d..b677b6bd 100644 --- a/subcmds/grep.py +++ b/subcmds/grep.py | |||
| @@ -24,6 +24,10 @@ from error import InvalidArgumentsError | |||
| 24 | from error import SilentRepoExitError | 24 | from error import SilentRepoExitError |
| 25 | from git_command import GitCommand | 25 | from git_command import GitCommand |
| 26 | from project import Project | 26 | from project import Project |
| 27 | from repo_logging import RepoLogger | ||
| 28 | |||
| 29 | |||
| 30 | logger = RepoLogger(__file__) | ||
| 27 | 31 | ||
| 28 | 32 | ||
| 29 | class GrepColoring(Coloring): | 33 | class GrepColoring(Coloring): |
| @@ -371,7 +375,7 @@ contain a line that matches both expressions: | |||
| 371 | if opt.revision: | 375 | if opt.revision: |
| 372 | if "--cached" in cmd_argv: | 376 | if "--cached" in cmd_argv: |
| 373 | msg = "fatal: cannot combine --cached and --revision" | 377 | msg = "fatal: cannot combine --cached and --revision" |
| 374 | print(msg, file=sys.stderr) | 378 | logger.error(msg) |
| 375 | raise InvalidArgumentsError(msg) | 379 | raise InvalidArgumentsError(msg) |
| 376 | have_rev = True | 380 | have_rev = True |
| 377 | cmd_argv.extend(opt.revision) | 381 | cmd_argv.extend(opt.revision) |
| @@ -396,5 +400,5 @@ contain a line that matches both expressions: | |||
| 396 | sys.exit(0) | 400 | sys.exit(0) |
| 397 | elif have_rev and bad_rev: | 401 | elif have_rev and bad_rev: |
| 398 | for r in opt.revision: | 402 | for r in opt.revision: |
| 399 | print("error: can't search revision %s" % r, file=sys.stderr) | 403 | logger.error("error: can't search revision %s", r) |
| 400 | raise GrepCommandError(aggregate_errors=errors) | 404 | raise GrepCommandError(aggregate_errors=errors) |
