mercurial/transaction.py
changeset 47425 0e4e9c1b4cc8
parent 47424 22e21deed474
child 47426 e7ad2490d623
--- a/mercurial/transaction.py	Wed Jun 09 01:12:03 2021 +0200
+++ b/mercurial/transaction.py	Wed Jun 09 01:14:18 2021 +0200
@@ -702,6 +702,11 @@
             self._releasefn = None  # Help prevent cycles.
 
 
+BAD_VERSION_MSG = _(
+    b"journal was created by a different version of Mercurial\n"
+)
+
+
 def rollback(opener, vfsmap, file, report, checkambigfiles=None):
     """Rolls back the transaction contained in the given file
 
@@ -746,12 +751,7 @@
                         l, f, b, c = line.split(b'\0')
                         backupentries.append((l, f, b, bool(c)))
             else:
-                report(
-                    _(
-                        b"journal was created by a different version of "
-                        b"Mercurial\n"
-                    )
-                )
+                report(BAD_VERSION_MSG)
 
     _playback(
         file,