bugfix: Avoid starting incremental conversions from scratch
commitf741bf39f2a875bcc6051296a0ff643bcaa76e4d
authorFrej Drejhammar <frej.drejhammar@gmail.com>
Fri, 19 Feb 2021 15:46:37 +0000 (19 16:46 +0100)
committerFrej Drejhammar <frej.drejhammar@gmail.com>
Fri, 19 Feb 2021 15:47:53 +0000 (19 16:47 +0100)
treec600d7aae589d6ca21d1e866a63c96b38807c3a3
parent427663c766b05ece3a2fbec5642074446b06d4af
bugfix: Avoid starting incremental conversions from scratch

Keys and values in the state cache are byte strings, therefore a
lookup of 'tip' will always fail. The failure makes the conversion
start over from the beginning, but as fast-export is deterministic the
results are the same, just very inefficient. The bug has existed since
the port to Python 3.

This patch switches the 'tip' lookup to use a byte string which should
make incremental conversions restart at the last converted commit. As
'x' == b'x' in Python 2, this should be a backwards compatible change.

Bug reported and fix suggested by Tomas Kolda.

Fixes #258.
hg-fast-export.py