rebase: add ui.log calls for whether IMM used, whether rebasing WCP
authorPhil Cohen <phillco@fb.com>
Wed, 13 Dec 2017 10:29:22 -0800
changeset 35434 71446ca85813
parent 35433 f98fac24b757
child 35435 f01101100043
rebase: add ui.log calls for whether IMM used, whether rebasing WCP Make it a bit easy to get metrics from these. Differential Revision: https://phab.mercurial-scm.org/D1681
hgext/rebase.py
--- a/hgext/rebase.py	Mon Dec 11 17:02:02 2017 -0800
+++ b/hgext/rebase.py	Wed Dec 13 10:29:22 2017 -0800
@@ -390,6 +390,9 @@
         else:
             self.wctx = self.repo[None]
             self.repo.ui.debug("rebasing on disk\n")
+        self.repo.ui.log("rebase", "", {
+            'rebase_imm_used': self.wctx.isinmemory()
+        })
 
     def _performrebase(self, tr):
         self._assignworkingcopy()
@@ -957,6 +960,7 @@
     # stacks that include the WCP. However, I'm not yet sure where the cutoff
     # is.
     rebasingwcp = repo['.'].rev() in rebaseset
+    ui.log("rebase", "", {'rebase_rebasing_wcp': rebasingwcp})
     if rbsrt.inmemory and rebasingwcp:
         rbsrt.inmemory = False
         # Check these since we did not before.