changeset 51453:a5d8f261b716 stable

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.
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 13 Mar 2024 16:22:13 -0300
parents e5b28637f4ca
children d4095f7b000a
files mercurial/obsutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/obsutil.py	Mon Mar 11 11:11:34 2024 +0100
+++ b/mercurial/obsutil.py	Wed Mar 13 16:22:13 2024 -0300
@@ -468,10 +468,10 @@
 
         # 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