Mercurial > hg
changeset 24143:7b09dbbbd502
tags: write tags cache deterministically
An upcoming test verifies content of the .hg/cache/tags file. During
testing, inconsistent output was observed. This is the result of
iterating over a dictionary.
Throw a sorted() around tags entries to ensure .hg/cache/tags is written
deterministically so test output is stable.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 24 Feb 2015 00:06:47 -0800 |
parents | be7cb25186be |
children | a35b59d4df33 |
files | mercurial/tags.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/tags.py Thu Jan 22 12:36:38 2015 -0800 +++ b/mercurial/tags.py Tue Feb 24 00:06:47 2015 -0800 @@ -337,7 +337,7 @@ # them local encoding on input, we would lose info writing them to # the cache. cachefile.write('\n') - for (name, (node, hist)) in cachetags.iteritems(): + for (name, (node, hist)) in sorted(cachetags.iteritems()): for n in hist: cachefile.write("%s %s\n" % (hex(n), name)) cachefile.write("%s %s\n" % (hex(node), name))