Patchwork D1891: transaction: fix hg version check when loading journal

login
register
mail settings
Submitter phabricator
Date Jan. 18, 2018, 4:12 p.m.
Message ID <689a5e3a86d46ba12a2e23ffa88e4bbb@localhost.localdomain>
Download mbox | patch
Permalink /patch/26911/
State Not Applicable
Headers show

Comments

phabricator - Jan. 18, 2018, 4:12 p.m.
durin42 updated this revision to Diff 4907.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1891?vs=4881&id=4907

REVISION DETAIL
  https://phab.mercurial-scm.org/D1891

AFFECTED FILES
  mercurial/transaction.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: pulkit, mercurial-devel

Patch

diff --git a/mercurial/transaction.py b/mercurial/transaction.py
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -612,7 +612,7 @@ 
         lines = fp.readlines()
         if lines:
             ver = lines[0][:-1]
-            if ver == str(version):
+            if ver == (b'%d' % version):
                 for line in lines[1:]:
                     if line:
                         # Shave off the trailing newline