comparison mercurial/obsutil.py @ 51502: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 642e31cb55f0
children f28c52a9f7b4
comparison
equal deleted inserted replaced
51501:e5b28637f4ca 51502:a5d8f261b716
466 if changectx.parents() != source.parents(): 466 if changectx.parents() != source.parents():
467 effects |= PARENTCHANGED 467 effects |= PARENTCHANGED
468 468
469 # Check if other meta has changed 469 # Check if other meta has changed
470 changeextra = changectx.extra().items() 470 changeextra = changectx.extra().items()
471 ctxmeta = list(filter(metanotblacklisted, changeextra)) 471 ctxmeta = sorted(filter(metanotblacklisted, changeextra))
472 472
473 sourceextra = source.extra().items() 473 sourceextra = source.extra().items()
474 srcmeta = list(filter(metanotblacklisted, sourceextra)) 474 srcmeta = sorted(filter(metanotblacklisted, sourceextra))
475 475
476 if ctxmeta != srcmeta: 476 if ctxmeta != srcmeta:
477 effects |= METACHANGED 477 effects |= METACHANGED
478 478
479 # Check if the diff has changed 479 # Check if the diff has changed