evolve: gather evolve output together
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 08 Aug 2014 23:11:09 -0700
changeset 1046 296d48e1f55a
parent 1045 b346d7a3d89e
child 1047 d830377bf186
evolve: gather evolve output together We stop relying on ui.status being muted when --quiet is used. Instead we use plain write and hide this behind an explicite ui.quiet check. This will help use enforcing this output in the comming --confirm mode.
hgext/evolve.py
--- a/hgext/evolve.py	Fri Aug 08 21:06:48 2014 -0700
+++ b/hgext/evolve.py	Fri Aug 08 23:11:09 2014 -0700
@@ -1363,9 +1363,9 @@
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
     target = repo[target]
     if not ui.quiet:
-        repo.ui.status(_('move:'))
+        repo.ui.write(_('move:'))
         displayer.show(orig)
-        repo.ui.status(_('atop:'))
+        repo.ui.write(_('atop:'))
         displayer.show(target)
     if progresscb: progresscb()
     todo = 'hg rebase -r %s -d %s\n' % (orig, target)
@@ -1396,11 +1396,10 @@
                          ' %s being a merge' % prec)
 
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
-    repo.ui.status(_('recreate:'))
     if not ui.quiet:
+        repo.ui.write(_('recreate:'))
         displayer.show(bumped)
-    repo.ui.status(_('atop:'))
-    if not ui.quiet:
+        repo.ui.write(_('atop:'))
         displayer.show(prec)
     if dryrun:
         todo = 'hg rebase --rev %s --dest %s;\n' % (bumped, prec.p1())
@@ -1517,14 +1516,12 @@
                               % {'d': divergent, 'o': other})
 
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
-    ui.status(_('merge:'))
     if not ui.quiet:
+        ui.write(_('merge:'))
         displayer.show(divergent)
-    ui.status(_('with: '))
-    if not ui.quiet:
+        ui.write(_('with: '))
         displayer.show(other)
-    ui.status(_('base: '))
-    if not ui.quiet:
+        ui.write(_('base: '))
         displayer.show(base)
     if dryrun:
         ui.write('hg update -c %s &&\n' % divergent)