[PATCH 7 of 8] ui: add diff.showfunc to progressive mode
Mathias De Maré
mathias.demare at gmail.com
Sat Mar 28 05:51:07 CDT 2015
# HG changeset patch
# User Mathias De Maré <mathias.demare at gmail.com>
# Date 1427230051 -3600
# Tue Mar 24 21:47:31 2015 +0100
# Node ID cf580680a070606cb8bfed0fd1afffbfecdcbf7c
# Parent c5c5e11ea7b6c669b22eee5c94f98e9c11dc01df
ui: add diff.showfunc to progressive mode
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -482,6 +482,8 @@
if not self.hasconfig('diff', 'git'):
self.setconfig('diff', 'git', 'True')
+ 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 --git a/tests/test-diff-unified.t b/tests/test-diff-unified.t
--- a/tests/test-diff-unified.t
+++ b/tests/test-diff-unified.t
@@ -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 ..
More information about the Mercurial-devel
mailing list