dirstate: split a not-so-one-liner
This is simpler to read.
Differential Revision: https://phab.mercurial-scm.org/D10924
--- a/mercurial/dirstate.py Thu Jul 01 18:56:34 2021 +0200
+++ b/mercurial/dirstate.py Thu Jul 01 18:57:35 2021 +0200
@@ -433,9 +433,9 @@
if state == b'a' or oldstate == b'r':
scmutil.checkfilename(f)
if self._map.hastrackeddir(f):
- raise error.Abort(
- _(b'directory %r already in dirstate') % pycompat.bytestr(f)
- )
+ msg = _(b'directory %r already in dirstate')
+ msg %= pycompat.bytestr(f)
+ raise error.Abort(msg)
# shadows
for d in pathutil.finddirs(f):
if self._map.hastrackeddir(d):