Patchwork [5,of,7,V2,mergedriver] filemerge: only print out "merging f" output at premerge step

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 12, 2015, 7:45 a.m.
Message ID <4d0ba4be4eb10d20e4f7.1444635940@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10954/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 12, 2015, 7:45 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444618973 25200
#      Sun Oct 11 20:02:53 2015 -0700
# Node ID 4d0ba4be4eb10d20e4f7c97049cb3bb093222a5e
# Parent  ca2216f6fcc59cc46085609e62f95f1fecf9e79b
filemerge: only print out "merging f" output at premerge step

We're soon going to call this function twice, once for premerge and once for
merge. This makes sure the "merging" output only gets printed during the
premerge step.

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -487,10 +487,11 @@  def _filemerge(premerge, repo, mynode, o
     if mergetype == nomerge:
         return True, func(repo, mynode, orig, fcd, fco, fca, toolconf)
 
-    if orig != fco.path():
-        ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd))
-    else:
-        ui.status(_("merging %s\n") % fd)
+    if premerge:
+        if orig != fco.path():
+            ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd))
+        else:
+            ui.status(_("merging %s\n") % fd)
 
     ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca))