[PATCH 1 of 2 v2] record: turn on showfunc

timeless timeless at mozdev.org
Thu Dec 17 20:16:09 UTC 2015


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1450363102 0
#      Thu Dec 17 14:38:22 2015 +0000
# Node ID d8ede77d10484e3249dd112bf2a282403ee02904
# Parent  4eeef1b2d689bad18f473b5e118cca061f6ca560
record: turn on showfunc

Always try to give diff context when doing an interactive record

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -116,6 +116,7 @@
         diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True)
         diffopts.nodates = True
         diffopts.git = True
+        diffopts.showfunc = True
         originaldiff =  patch.diff(repo, changes=status, opts=diffopts)
         originalchunks = patch.parsepatch(originaldiff)
 
diff --git a/tests/test-commit-interactive.t b/tests/test-commit-interactive.t
--- a/tests/test-commit-interactive.t
+++ b/tests/test-commit-interactive.t
@@ -318,7 +318,7 @@
   1 hunks, 1 lines changed
   examine changes to 'plain'? [Ynesfdaq?] y
   
-  @@ -9,3 +9,4 @@
+  @@ -9,3 +9,4 @@ 8
    9
    10
    11
@@ -342,7 +342,7 @@
   1 hunks, 1 lines changed
   examine changes to 'plain'? [Ynesfdaq?] y
   
-  @@ -9,4 +9,4 @@
+  @@ -9,4 +9,4 @@ 8
    9
    10
    11
@@ -387,7 +387,7 @@
    4
   record change 1/3 to 'plain'? [Ynesfdaq?] y
   
-  @@ -8,5 +8,3 @@
+  @@ -8,5 +8,3 @@ 7
    8
    9
    10
@@ -656,7 +656,7 @@
   1 hunks, 2 lines changed
   examine changes to 'plain'? [Ynesfdaq?] y
   
-  @@ -9,3 +9,5 @@
+  @@ -9,3 +9,5 @@ 6
    7
    8
    9
@@ -946,7 +946,7 @@
   1 hunks, 1 lines changed
   examine changes to 'subdir/f1'? [Ynesfdaq?] y
   
-  @@ -2,3 +2,4 @@
+  @@ -2,3 +2,4 @@ a
    a
    a
    b
@@ -1379,7 +1379,7 @@
   1 hunks, 1 lines changed
   examine changes to 'subdir/f1'? [Ynesfdaq?] y
   
-  @@ -3,3 +3,4 @@
+  @@ -3,3 +3,4 @@ a
    a
    b
    c
@@ -1418,7 +1418,7 @@
   1 hunks, 1 lines changed
   examine changes to 'subdir/f1'? [Ynesfdaq?] y
   
-  @@ -4,3 +4,4 @@
+  @@ -4,3 +4,4 @@ a
    b
    c
    d
@@ -1449,7 +1449,7 @@
   1 hunks, 1 lines changed
   examine changes to 'plain' and 'plain3'? [Ynesfdaq?] y
   
-  @@ -11,3 +11,4 @@
+  @@ -11,3 +11,4 @@ 8
    9
    10
    11
diff --git a/tests/test-diff-color.t b/tests/test-diff-color.t
--- a/tests/test-diff-color.t
+++ b/tests/test-diff-color.t
@@ -91,7 +91,7 @@
   1 hunks, 1 lines changed
   \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m y (esc)
   
-  \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
+  \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc)
    c
    a
    a
@@ -121,7 +121,7 @@
   1 hunks, 1 lines changed
   \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m y (esc)
   
-  \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
+  \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc)
    c
    a
    a


More information about the Mercurial-devel mailing list