# HG changeset patch # User Pierre-Yves David # Date 1625158594 -7200 # Node ID e6b303eb8f7d45e9fa69adf92dc834bd36f6f5cc # Parent ca8121d267322b4af78ff0e5e05c315816bdab89 dirstate: split a not-so-one-liner This is shorter and simpler to read. Differential Revision: https://phab.mercurial-scm.org/D10923 diff -r ca8121d26732 -r e6b303eb8f7d mercurial/dirstate.py --- 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)