Patchwork [6,of,6,V2] ui: add diff.showfunc to progressive mode

login
register
mail settings
Submitter Mathias De Maré
Date April 7, 2015, 7 p.m.
Message ID <1119096577c9167da3a8.1428433252@mathias-Latitude-E6540>
Download mbox | patch
Permalink /patch/8548/
State Changes Requested
Headers show

Comments

Mathias De Maré - April 7, 2015, 7 p.m.
# HG changeset patch
# User Mathias De Maré <mathias.demare@gmail.com>
# Date 1427230051 -3600
#      Tue Mar 24 21:47:31 2015 +0100
# Node ID 1119096577c9167da3a85b744c487ff42f9ea48f
# Parent  431cc24028deada0e3bbc55ff3dee7d962caa922
ui: add diff.showfunc to progressive mode

Patch

diff -r 431cc24028de -r 1119096577c9 mercurial/ui.py
--- a/mercurial/ui.py	Tue Mar 24 21:43:18 2015 +0100
+++ b/mercurial/ui.py	Tue Mar 24 21:47:31 2015 +0100
@@ -483,6 +483,8 @@ 
         if not self.progressive():
             return
 
+        if not self.hasconfig('diff', 'showfunc'):
+            self.setconfig('diff', 'showfunc', 'True')
         if not self.hasconfig('ui', 'statuscopies'):
             self.setconfig('ui', 'statuscopies', 'True')
         if not self.hasconfig('extensions', 'color'):
diff -r 431cc24028de -r 1119096577c9 tests/test-diff-unified.t
--- a/tests/test-diff-unified.t	Tue Mar 24 21:43:18 2015 +0100
+++ b/tests/test-diff-unified.t	Tue Mar 24 21:47:31 2015 +0100
@@ -332,5 +332,18 @@ 
   +    int e = 3;
   +    return a + b + c + e;
    }
+  $ hg diff --config ui.progressive=True --git
+  diff --git a/f1 b/f1
+  --- a/f1
+  +++ b/f1
+  @@ -2,6 +2,6 @@ int main() {
+       int a = 0;
+       int b = 1;
+       int c = 2;
+  -    int d = 3;
+  -    return a + b + c + d;
+  +    int e = 3;
+  +    return a + b + c + e;
+   }
 
   $ cd ..