Mercurial > hg > mercurial-source
comparison mercurial/transaction.py @ 36618:aad39713ef35
transaction: fix hg version check when loading journal
Differential Revision: https://phab.mercurial-scm.org/D1891
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 17 Jan 2018 20:41:51 -0500 |
parents | bbbbd3c30bfc |
children | ef345f9e4295 |
comparison
equal
deleted
inserted
replaced
36617:a011e4140435 | 36618:aad39713ef35 |
---|---|
610 if opener.exists(backupjournal): | 610 if opener.exists(backupjournal): |
611 fp = opener.open(backupjournal) | 611 fp = opener.open(backupjournal) |
612 lines = fp.readlines() | 612 lines = fp.readlines() |
613 if lines: | 613 if lines: |
614 ver = lines[0][:-1] | 614 ver = lines[0][:-1] |
615 if ver == str(version): | 615 if ver == (b'%d' % version): |
616 for line in lines[1:]: | 616 for line in lines[1:]: |
617 if line: | 617 if line: |
618 # Shave off the trailing newline | 618 # Shave off the trailing newline |
619 line = line[:-1] | 619 line = line[:-1] |
620 l, f, b, c = line.split('\0') | 620 l, f, b, c = line.split('\0') |