dirstate: split a not-so-one-liner
This is shorter and simpler to read.
Differential Revision: https://phab.mercurial-scm.org/D10923
--- a/mercurial/dirstate.py Mon Jun 28 16:50:19 2021 +0200
+++ b/mercurial/dirstate.py Thu Jul 01 18:56:34 2021 +0200
@@ -502,9 +502,8 @@
def otherparent(self, f):
'''Mark as coming from the other parent, always dirty.'''
if self._pl[1] == self._nodeconstants.nullid:
- raise error.Abort(
- _(b"setting %r to other parent only allowed in merges") % f
- )
+ msg = _(b"setting %r to other parent only allowed in merges") % f
+ raise error.Abort(msg)
if f in self and self[f] == b'n':
# merge-like
self._addpath(f, b'm', 0, -2, -1)