comparison mercurial/commands.py @ 46794:e2f7b2695ba1

merge with stable
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 18 Mar 2021 18:24:59 -0400
parents 066b8d8f75b8 184e0ae0a4b2
children f51ff655d338
comparison
equal deleted inserted replaced
46782:6b52cffd8d0a 46794:e2f7b2695ba1
1081 if p2 != nullid: 1081 if p2 != nullid:
1082 raise error.StateError(_(b'current bisect revision is a merge')) 1082 raise error.StateError(_(b'current bisect revision is a merge'))
1083 if rev: 1083 if rev:
1084 if not nodes: 1084 if not nodes:
1085 raise error.Abort(_(b'empty revision set')) 1085 raise error.Abort(_(b'empty revision set'))
1086 node = repo[nodes.last()].node() 1086 node = repo[nodes[-1]].node()
1087 with hbisect.restore_state(repo, state, node): 1087 with hbisect.restore_state(repo, state, node):
1088 while changesets: 1088 while changesets:
1089 # update state 1089 # update state
1090 state[b'current'] = [node] 1090 state[b'current'] = [node]
1091 hbisect.save_state(repo, state) 1091 hbisect.save_state(repo, state)
3450 reflags |= re.I 3450 reflags |= re.I
3451 try: 3451 try:
3452 regexp = util.re.compile(pattern, reflags) 3452 regexp = util.re.compile(pattern, reflags)
3453 except re.error as inst: 3453 except re.error as inst:
3454 ui.warn( 3454 ui.warn(
3455 _(b"grep: invalid match pattern: %s\n") % pycompat.bytestr(inst) 3455 _(b"grep: invalid match pattern: %s\n")
3456 % stringutil.forcebytestr(inst)
3456 ) 3457 )
3457 return 1 3458 return 1
3458 sep, eol = b':', b'\n' 3459 sep, eol = b':', b'\n'
3459 if opts.get(b'print0'): 3460 if opts.get(b'print0'):
3460 sep = eol = b'\0' 3461 sep = eol = b'\0'