evolve: in pubdiv resolution make sure that transaction get closed
authorSushil khanchi <sushilkhanchi97@gmail.com>
Thu, 28 Feb 2019 02:02:18 +0530
changeset 4414 29645d5ba3d9
parent 4413 2360a1e050a6
child 4415 29733c2b0fd3
evolve: in pubdiv resolution make sure that transaction get closed Before this patch it could be possible that transaction won't get closed if res is False in the pubic divergence resolution when continuing the hg evolve.
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Mon Feb 25 22:50:24 2019 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Feb 28 02:02:18 2019 +0530
@@ -1903,11 +1903,13 @@
         if publicdiv:
             res, newnode = ret
             if not res:
-                return (res, newnode)
-            prec = repo[publicdiv]
-            bumped = repo[newnode]
-            ret = _resolvephasedivergent(ui, repo, prec=prec, bumped=bumped,
-                                         tmpctx=bumped)
+                # no need to proceed for phase divergence resolution step
+                pass
+            else:
+                prec = repo[publicdiv]
+                bumped = repo[newnode]
+                ret = _resolvephasedivergent(ui, repo, prec=prec,
+                                             bumped=bumped, tmpctx=bumped)
         tr.close()
         return ret
     finally: