diff hgext3rd/topic/__init__.py @ 6702:691a9301b51e

topic: drop compatibility for tr.changes[b'phases'] being a dict in hg 5.3
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 10 Jan 2024 15:39:03 -0300
parents f0cbc19e77ef
children 50c0f1e2dfb6
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Wed Jan 10 15:28:20 2024 -0300
+++ b/hgext3rd/topic/__init__.py	Wed Jan 10 15:39:03 2024 -0300
@@ -482,11 +482,7 @@
     # - forcefully making changesets draft again
     # - turning secret changesets draft and making them visible to peers
     tnsphases = (phases.secret, phases.draft)
-    phasechanges = tr.changes[b'phases']
-    if isinstance(phasechanges, dict):
-        # hg <= 5.3 (fdc802f29b2c)
-        phasechanges = [((k,), v) for k, v in phasechanges.items()]
-    for revs, (old, new) in phasechanges:
+    for revs, (old, new) in tr.changes[b'phases']:
         if old not in tnsphases and new not in tnsphases:
             # Skip phase movement if there is no phase (old or new) that has
             # visible topic namespace (i.e. draft and secret)