[PATCH] rebase/progress: supress merge output if progress is active

timeless timeless at gmail.com
Sun Aug 1 17:04:28 UTC 2010


As some of you know, i'm doing regular rebases of a ~150 long mq
against mozilla-central, which is well, long and painful.
I found the output "merging whatever" is really unhelpful and rather
annoying. What I'm interested in when i have the progress extension is
what part of the rebase step it's at (rebasing <x>).

# HG changeset patch
# User timeless <timeless at gmail.com>
# Date 1280681452 -10800
# Node ID fe476381faa3d1ca35cb3783a1178b001c168dc1
# Parent  1b5facc99e171f37262bbfdd63c02543e1507a6a
rebase/progress: supress merge output if progress is active

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -233,11 +233,16 @@ def rebasemerge(repo, rev, first=False):
         ancestor.ancestor = newancestor
     else:
         repo.ui.debug("first revision, do not change ancestor\n")
+    progress = extensions.find('progress')
+    if progress:
+        repo.ui.pushbuffer()
     try:
         stats = merge.update(repo, rev, True, True, False)
         return stats
     finally:
         ancestor.ancestor = oldancestor
+        if progress:
+            repo.ui.popbuffer()

 def checkexternal(repo, state, targetancestors):
     """Check whether one or more external revisions need to be taken in



More information about the Mercurial-devel mailing list