diff hgext/histedit.py @ 28004:34165875fa5d

histedit: limit updated and merging output to important updates Output is retained when: * There's a conflict * User asked to edit * User aborts otherwise, output is suppressed
author timeless <timeless@mozdev.org>
date Wed, 03 Feb 2016 13:52:04 +0000
parents 92a61d7618ac
children 27ae22a4f9f9
line wrap: on
line diff
--- a/hgext/histedit.py	Thu Feb 04 23:30:49 2016 +0000
+++ b/hgext/histedit.py	Wed Feb 03 13:52:04 2016 +0000
@@ -447,13 +447,18 @@
         parentctx, but does not commit them."""
         repo = self.repo
         rulectx = repo[self.node]
+        repo.ui.pushbuffer(error=True, labeled=True)
         hg.update(repo, self.state.parentctxnode, quietempty=True)
         stats = applychanges(repo.ui, repo, rulectx, {})
         if stats and stats[3] > 0:
+            buf = repo.ui.popbuffer()
+            repo.ui.write(*buf)
             raise error.InterventionRequired(
                 _('Fix up the change (%s %s)') %
                 (self.verb, node.short(self.node)),
                 hint=_('hg histedit --continue to resume'))
+        else:
+            repo.ui.popbuffer()
 
     def continuedirty(self):
         """Continues the action when changes have been applied to the working
@@ -733,7 +738,9 @@
 
     def finishfold(self, ui, repo, ctx, oldctx, newnode, internalchanges):
         parent = ctx.parents()[0].node()
+        repo.ui.pushbuffer()
         hg.update(repo, parent)
+        repo.ui.popbuffer()
         ### prepare new commit data
         commitopts = {}
         commitopts['user'] = ctx.user()
@@ -764,7 +771,9 @@
             repo.ui.restoreconfig(phasebackup)
         if n is None:
             return ctx, []
+        repo.ui.pushbuffer()
         hg.update(repo, n)
+        repo.ui.popbuffer()
         replacements = [(oldctx.node(), (newnode,)),
                         (ctx.node(), (n,)),
                         (newnode, (n,)),
@@ -1167,7 +1176,9 @@
     state.write()
     ui.progress(_("editing"), None)
 
+    repo.ui.pushbuffer()
     hg.update(repo, state.parentctxnode, quietempty=True)
+    repo.ui.popbuffer()
 
     mapping, tmpnodes, created, ntm = processreplacement(state)
     if mapping: