evolvecmd: use the evolvestate object passed as argument in _solveunstable
authorPulkit Goyal <7895pulkit@gmail.com>
Mon, 22 Jan 2018 17:54:27 +0530
changeset 3479 4b9fc8c85ee4
parent 3478 4a1ccae58323
child 3480 1799fc777f30
evolvecmd: use the evolvestate object passed as argument in _solveunstable Earlier if get a merge conflict, we used to initialize a new evolvestate object and used to save it. Let's start using the state object which we get in as argument as that will contain more data about the state.
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Mon Jan 22 17:44:57 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Mon Jan 22 17:54:27 2018 +0530
@@ -157,7 +157,7 @@
             return (True, newid)
         except MergeFailure:
             ops = {'current': orig.node()}
-            evolvestate = state.cmdstate(repo, opts=ops)
+            evolvestate.addopts(ops)
             evolvestate.save()
             repo.ui.write_err(_('evolve failed!\n'))
             repo.ui.write_err(