changeset 46449:62a0b5daa15f

diff: suppress `merging foo` output lines when performing a merge diff Differential Revision: https://phab.mercurial-scm.org/D9939
author Augie Fackler <augie@google.com>
date Mon, 01 Feb 2021 11:57:18 -0500
parents 1a7d12c82057
children 1c66795862cf
files mercurial/commands.py tests/test-diff-change.t
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu May 07 16:50:26 2020 -0400
+++ b/mercurial/commands.py	Mon Feb 01 11:57:18 2021 -0500
@@ -2576,7 +2576,9 @@
                 },
                 b'diff --merge',
             ):
+                repo.ui.pushbuffer()
                 mergemod.merge(pctx2, wc=wctx)
+                repo.ui.popbuffer()
             ctx1 = wctx
         else:
             ctx1 = ctx2.p1()
--- a/tests/test-diff-change.t	Thu May 07 16:50:26 2020 -0400
+++ b/tests/test-diff-change.t	Mon Feb 01 11:57:18 2021 -0500
@@ -197,7 +197,6 @@
 merge diff should show only manual edits to a merge:
 
   $ hg diff --merge -c 6
-  merging file.txt
 (no diff output is expected here)
 
 Construct an "evil merge" that does something other than just the merge.
@@ -228,7 +227,6 @@
 up, making it easy to identify changes someone is otherwise trying to sneak
 into a merge.
   $ hg diff --merge -c 7
-  merging file.txt
   diff -r 8ad85e839ba7 file.txt
   --- a/file.txt	Thu Jan 01 00:00:00 1970 +0000
   +++ b/file.txt	Thu Jan 01 00:00:00 1970 +0000
@@ -277,7 +275,6 @@
   +this file is new in p2 of the merge
 With --merge, it's a diff against the conflicted content.
   $ hg diff --merge -c 11
-  merging file.txt
   diff -r 5010caab09f6 file.txt
   --- a/file.txt	Thu Jan 01 00:00:00 1970 +0000
   +++ b/file.txt	Thu Jan 01 00:00:00 1970 +0000