stablerangecache: fix output in the drifted case
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 27 Aug 2018 10:16:12 +0200
changeset 4007 d468db69f9a0
parent 4006 21aee0a596ce
child 4008 3d51dc72d884
stablerangecache: fix output in the drifted case The node were not hex, and the field had different order in the pair. This is now fixed.
hgext3rd/evolve/stablerangecache.py
--- a/hgext3rd/evolve/stablerangecache.py	Mon Aug 27 00:35:51 2018 +0200
+++ b/hgext3rd/evolve/stablerangecache.py	Mon Aug 27 10:16:12 2018 +0200
@@ -16,6 +16,7 @@
 from mercurial import (
     error,
     localrepo,
+    node as nodemod,
     util,
 )
 
@@ -270,8 +271,9 @@
                 # to add. This will confuse sqlite
                 msg = _('stable-range cache: skipping write, '
                         'database drifted under my feet\n')
-                hint = _('(disk: %s-%s vs mem: %s%s)\n')
-                data = (meta[2], meta[1], self._ondisktiprev, self._ondisktipnode)
+                hint = _('(disk: %s-%s vs mem: %s-%s)\n')
+                data = (nodemod.hex(meta[2]), meta[1],
+                        nodemod.hex(self._ondisktipnode), self._ondisktiprev)
                 repo.ui.warn(msg)
                 repo.ui.warn(hint % data)
                 con.execute('ROLLBACK;')