Patchwork [8,of,9] log: allow matchfn to be non-null even if both --patch/--stat are off

login
register
mail settings
Submitter Yuya Nishihara
Date Jan. 15, 2018, 1:26 p.m.
Message ID <670bc1871d139b1e9cf6.1516022802@mimosa>
Download mbox | patch
Permalink /patch/26769/
State Accepted
Headers show

Comments

Yuya Nishihara - Jan. 15, 2018, 1:26 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1515046846 -32400
#      Thu Jan 04 15:20:46 2018 +0900
# Node ID 670bc1871d139b1e9cf6dff01a343638ae56644c
# Parent  79298fa195792c1371945e3a7161b59387ba76e1
log: allow matchfn to be non-null even if both --patch/--stat are off

This makes the next patch slightly simpler.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1725,7 +1725,8 @@  class changeset_printer(object):
                 diffordiffstat(self.ui, self.repo, diffopts, prev, node,
                                match=matchfn, stat=False,
                                hunksfilterfn=hunksfilterfn)
-            self.ui.write("\n")
+            if stat or diff:
+                self.ui.write("\n")
 
 class jsonchangeset(changeset_printer):
     '''format changeset information.'''