# HG changeset patch # User Pierre-Yves David # Date 2019-03-15 13:52:36 # Node ID e3307243d18850b4ecfd3b9a9497dd4fc37cbbf9 # Parent 1fe278aa4ad5a8a327781096a80e1003514eeca0 manifestcache: stop altering the lru cache order while displaying it Accessing value with `.get` alter the iteration order and make the output of the debug command misbehave, showing multiple entry twice. We need more than 2 entry to see the bug, so there are not test change. Later test will introduce a third entry and would fail without this fix. diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -1503,7 +1503,7 @@ def debugmanifestfulltextcache(ui, repo, totalsize = 0 for nodeid in cache: # Use cache.get to not update the LRU order - data = cache.get(nodeid) + data = cache.peek(nodeid) size = len(data) totalsize += size + 24 # 20 bytes nodeid, 4 bytes size ui.write(_('id: %s, size %s\n') % (