# HG changeset patch # User Gregory Szorc # Date 1424765207 28800 # Node ID 7b09dbbbd5023323109368e27b377ba64d1839d9 # Parent be7cb25186be7e007c83c00a98d88bdad8d11194 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. diff -r be7cb25186be -r 7b09dbbbd502 mercurial/tags.py --- 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))