rebase: stop clearing on-disk mergestate when running in memory
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 18 Sep 2020 15:10:14 -0700
changeset 45512 b4abfe142ff6
parent 45511 e29cd888fd17
child 45513 22140fd783d2
rebase: stop clearing on-disk mergestate when running in memory In-memory merge no longer uses on-disk mergestate since 19590b126764 (merge: use in-memory mergestate when using in-memory context, 2020-09-15). This patch removes the clearing from two places in the in-memory rebase code. I've verified that the one with a TODO was indeed fixed by the aforementioned commit. The other instance doesn't seem to have any test coverage, but I'm pretty confident it's also safe to remove. Differential Revision: https://phab.mercurial-scm.org/D9057
hgext/rebase.py
--- a/hgext/rebase.py	Fri Sep 18 10:15:13 2020 -0700
+++ b/hgext/rebase.py	Fri Sep 18 15:10:14 2020 -0700
@@ -548,7 +548,6 @@
                     user=ctx.user(),
                     date=date,
                 )
-                mergestatemod.mergestate.clean(repo)
             else:
                 newnode = commitnode(
                     repo,
@@ -1089,9 +1088,6 @@
                     b' merge\n'
                 )
             )
-            # TODO: Make in-memory merge not use the on-disk merge state, so
-            # we don't have to clean it here
-            mergestatemod.mergestate.clean(repo)
             clearstatus(repo)
             clearcollapsemsg(repo)
             return _dorebase(ui, repo, action, opts, inmemory=False)