rebase: only store collapse message once
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 06 Mar 2018 14:29:20 -0800
changeset 36783 6dab3bdb1f00
parent 36782 a835bf3fe40a
child 36784 c164a3a282c1
rebase: only store collapse message once The message is determined by the user passing --message or --log when the rebase is started. There's no need to write it to a file for each rebased commit; writing it once at the start of the rebase is enough. Differential Revision: https://phab.mercurial-scm.org/D2712
hgext/rebase.py
--- a/hgext/rebase.py	Tue Mar 06 09:39:24 2018 -0800
+++ b/hgext/rebase.py	Tue Mar 06 14:29:20 2018 -0800
@@ -478,7 +478,6 @@
                                              self.state, self.skipped,
                                              self.obsoletenotrebased)
                 self.storestatus(tr=tr)
-                storecollapsemsg(repo, self.collapsemsg)
                 if len(repo[None].parents()) == 2:
                     repo.ui.debug('resuming interrupted rebase\n')
                 else:
@@ -846,6 +845,7 @@
             retcode = rbsrt._preparenewrebase(destmap)
             if retcode is not None:
                 return retcode
+            storecollapsemsg(repo, rbsrt.collapsemsg)
 
         tr = None