[Updated] D10844: transaction: clarify a conditionnal about version check
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Jun 17 13:31:01 UTC 2021
Closed by commit rHGe7ad2490d623: transaction: clarify a conditionnal about version check (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10844?vs=28521&id=28592
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10844/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10844
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
@@ -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,
To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210617/fc921f65/attachment-0002.html>
More information about the Mercurial-patches
mailing list