diff options
Diffstat (limited to 'subcmds/grep.py')
-rw-r--r-- | subcmds/grep.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subcmds/grep.py b/subcmds/grep.py index b067629a..fa5f8765 100644 --- a/subcmds/grep.py +++ b/subcmds/grep.py | |||
@@ -13,6 +13,7 @@ | |||
13 | # See the License for the specific language governing permissions and | 13 | # See the License for the specific language governing permissions and |
14 | # limitations under the License. | 14 | # limitations under the License. |
15 | 15 | ||
16 | from __future__ import print_function | ||
16 | import sys | 17 | import sys |
17 | from color import Coloring | 18 | from color import Coloring |
18 | from command import PagedCommand | 19 | from command import PagedCommand |
@@ -178,8 +179,7 @@ contain a line that matches both expressions: | |||
178 | have_rev = False | 179 | have_rev = False |
179 | if opt.revision: | 180 | if opt.revision: |
180 | if '--cached' in cmd_argv: | 181 | if '--cached' in cmd_argv: |
181 | print >>sys.stderr,\ | 182 | print('fatal: cannot combine --cached and --revision', file=sys.stderr) |
182 | 'fatal: cannot combine --cached and --revision' | ||
183 | sys.exit(1) | 183 | sys.exit(1) |
184 | have_rev = True | 184 | have_rev = True |
185 | cmd_argv.extend(opt.revision) | 185 | cmd_argv.extend(opt.revision) |
@@ -230,13 +230,13 @@ contain a line that matches both expressions: | |||
230 | out.nl() | 230 | out.nl() |
231 | else: | 231 | else: |
232 | for line in r: | 232 | for line in r: |
233 | print line | 233 | print(line) |
234 | 234 | ||
235 | if have_match: | 235 | if have_match: |
236 | sys.exit(0) | 236 | sys.exit(0) |
237 | elif have_rev and bad_rev: | 237 | elif have_rev and bad_rev: |
238 | for r in opt.revision: | 238 | for r in opt.revision: |
239 | print >>sys.stderr, "error: can't search revision %s" % r | 239 | print("error: can't search revision %s" % r, file=sys.stderr) |
240 | sys.exit(1) | 240 | sys.exit(1) |
241 | else: | 241 | else: |
242 | sys.exit(1) | 242 | sys.exit(1) |