Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/chgserver.py @ 45900:600aec73f309
errors: format "abort: " text in a new Abort.format() method
This remove some duplication we had.
Differential Revision: https://phab.mercurial-scm.org/D9348
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 20 Nov 2020 09:17:38 -0800 |
parents | 98399dd1b96c |
children | 7eb221b9af6c |
comparison
equal
deleted
inserted
replaced
45899:98399dd1b96c | 45900:600aec73f309 |
---|---|
510 self.ui.warn(inst.format()) | 510 self.ui.warn(inst.format()) |
511 self.ui.flush() | 511 self.ui.flush() |
512 self.cresult.write(b'exit 255') | 512 self.cresult.write(b'exit 255') |
513 return | 513 return |
514 except error.Abort as inst: | 514 except error.Abort as inst: |
515 self.ui.error(_(b"abort: %s\n") % inst.message) | 515 self.ui.error(inst.format()) |
516 if inst.hint: | |
517 self.ui.error(_(b"(%s)\n") % inst.hint) | |
518 self.ui.flush() | 516 self.ui.flush() |
519 self.cresult.write(b'exit 255') | 517 self.cresult.write(b'exit 255') |
520 return | 518 return |
521 newhash = hashstate.fromui(lui, self.hashstate.mtimepaths) | 519 newhash = hashstate.fromui(lui, self.hashstate.mtimepaths) |
522 insts = [] | 520 insts = [] |