evolve: explicitly turn revs to list before storing into evolvestate
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 23 Mar 2018 19:16:25 +0530
changeset 3627 31569df48c82
parent 3626 760210aa0d78
child 3628 170b99a9c0b4
evolve: explicitly turn revs to list before storing into evolvestate The cbor library which we are using cannot handle encoding and decoding Python sets, and revs was set there. Let's convert revs explicitly to list to make sure we don't try writing sets.
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Fri Mar 23 18:58:19 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Fri Mar 23 19:16:25 2018 +0530
@@ -1197,9 +1197,10 @@
             revs = _orderrevs(repo, revs)
 
         # cbor does not know how to serialize sets, using list for skippedrevs
-        stateopts = {'category': targetcat, 'replacements': {}, 'revs': revs,
-                     'confirm': confirmopt, 'startnode': startnode.node(),
-                     'skippedrevs': [], 'command': 'evolve', 'orphanmerge': False}
+        stateopts = {'category': targetcat, 'replacements': {},
+                     'revs': list(revs), 'confirm': confirmopt,
+                     'startnode': startnode.node(), 'skippedrevs': [],
+                     'command': 'evolve', 'orphanmerge': False}
         evolvestate.addopts(stateopts)
         for rev in revs:
             curctx = repo[rev]