changeset 4609:fe2999627556

next: start transaction before calling _solveone() All other callers do this, and I'm about to make _solveone() not create a transaction.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 19 Apr 2019 11:12:00 -0700
parents fe22c36b5563
children c54d4c2c2846
files hgext3rd/evolve/__init__.py
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Fri Apr 19 10:22:25 2019 -0700
+++ b/hgext3rd/evolve/__init__.py	Fri Apr 19 11:12:00 2019 -0700
@@ -1148,10 +1148,15 @@
     cmdutil.bailifchanged(repo)
     evolvestate = state.cmdstate(repo, opts={'command': 'next',
                                              'bookmarkchanges': []})
-    result = evolvecmd._solveone(ui, repo, repo[aspchildren],
-                                 evolvestate, opts.get('dry_run'), False,
-                                 lambda: None, category='orphan',
-                                 stacktmplt=opts.get('stacktemplate', False))
+    with repo.wlock(), repo.lock():
+        tr = repo.transaction("evolve")
+        with util.acceptintervention(tr):
+            result = evolvecmd._solveone(ui, repo, repo[aspchildren],
+                                         evolvestate, opts.get('dry_run'),
+                                         False,
+                                         lambda: None, category='orphan',
+                                         stacktmplt=opts.get('stacktemplate',
+                                                             False))
     # making sure a next commit is formed
     if result[0] and result[1]:
         ui.status(_('working directory now at %s\n')