# HG changeset patch # User Anton Shestakov # Date 2024-03-13 19:22:13 # Node ID a5d8f261b71674cb5d0833bb605049fe073a966a # Parent e5b28637f4cacf73ce37014016fc505fd6f8c53a obsutil: sort metadata before comparing in geteffectflag() This is probably less important now that we dropped Python 2. We do still support Python 3.6 though, and the dictionaries aren't ordered there either (that was a big change that came with 3.7). Still, maybe it's a good idea to sort metadata explicitly. diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py --- a/mercurial/obsutil.py +++ b/mercurial/obsutil.py @@ -468,10 +468,10 @@ def geteffectflag(source, successors): # Check if other meta has changed changeextra = changectx.extra().items() - ctxmeta = list(filter(metanotblacklisted, changeextra)) + ctxmeta = sorted(filter(metanotblacklisted, changeextra)) sourceextra = source.extra().items() - srcmeta = list(filter(metanotblacklisted, sourceextra)) + srcmeta = sorted(filter(metanotblacklisted, sourceextra)) if ctxmeta != srcmeta: effects |= METACHANGED