marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches.
REVISION SUMMARY This make the code a bit simpler and clearer. (This is an opportunity improvement while looking at something next to that.) REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10843 AFFECTED FILES mercurial/transaction.py CHANGE DETAILS diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -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, To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel