comparison mercurial/cmd_impls/graft.py @ 52378:1802d9afddf7

graft: fix interpolation in a ProgrammingError case The `action` is str, which can't be interpolated into bytes. Fortunately, `ProgrammingError` allows a str to be passed.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 29 Nov 2024 19:22:51 -0500
parents 58827d815646
children 0facc743b92f
comparison
equal deleted inserted replaced
52377:a48c688d3e80 52378:1802d9afddf7
18 assert args is None 18 assert args is None
19 return _stopgraft(ui, repo, graftstate) 19 return _stopgraft(ui, repo, graftstate)
20 elif action == "GRAFT": 20 elif action == "GRAFT":
21 return _graft_revisions(ui, repo, graftstate, *args) 21 return _graft_revisions(ui, repo, graftstate, *args)
22 else: 22 else:
23 raise error.ProgrammingError(b'unknown action: %s' % action) 23 raise error.ProgrammingError('unknown action: %s' % action)
24 24
25 25
26 def _process_args(ui, repo, *revs, **opts): 26 def _process_args(ui, repo, *revs, **opts):
27 """process the graft command argument to figure out what to do 27 """process the graft command argument to figure out what to do
28 28