transaction: clarify a conditionnal about version check
Let us move the short branch early.
Differential Revision: https://phab.mercurial-scm.org/D10844
--- a/mercurial/transaction.py Wed Jun 09 01:14:18 2021 +0200
+++ b/mercurial/transaction.py Wed Jun 09 01:13:09 2021 +0200
@@ -743,15 +743,15 @@
lines = fp.readlines()
if lines:
ver = lines[0][:-1]
- if ver == (b'%d' % version):
+ if ver != (b'%d' % version):
+ report(BAD_VERSION_MSG)
+ else:
for line in lines[1:]:
if line:
# Shave off the trailing newline
line = line[:-1]
l, f, b, c = line.split(b'\0')
backupentries.append((l, f, b, bool(c)))
- else:
- report(BAD_VERSION_MSG)
_playback(
file,