Mercurial > hg-stable
changeset 47425:0e4e9c1b4cc8
transaction: extract message about different version in a constants
This make the code a bit simpler and clearer.
(This is an opportunity improvement while looking at something next to that.)
Differential Revision: https://phab.mercurial-scm.org/D10843
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 09 Jun 2021 01:14:18 +0200 |
parents | 22e21deed474 |
children | e7ad2490d623 |
files | mercurial/transaction.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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,