tests: add test for "log -r wdir() -p" (
issue4871)
The issue has been fixed by
93bcc73df8d5, "cmdutil.changeset_printer: pass
context into showpatch()". This patch adds test to prevent future regression.
--- a/tests/test-log.t Sun Mar 13 23:21:45 2016 +0900
+++ b/tests/test-log.t Sun Mar 13 23:27:27 2016 +0900
@@ -1788,6 +1788,14 @@
date: [A-Za-z0-9:+ ]+ (re)
extra: branch=default
+ $ hg log -r 'wdir()' -p --stat
+ changeset: 2147483647:ffffffffffff
+ parent: 0:65624cd9070a
+ user: test
+ date: [A-Za-z0-9:+ ]+ (re)
+
+
+
dirty:
@@ -1821,6 +1829,36 @@
files-: .d6/f1
extra: branch=default
+ $ hg log -r 'wdir()' -p --stat --git
+ changeset: 2147483647:ffffffffffff
+ parent: 0:65624cd9070a
+ user: test
+ date: [A-Za-z0-9:+ ]+ (re)
+
+ .d6/f1 | 1 -
+ d1/f1 | 1 +
+ d1/f2 | 1 +
+ 3 files changed, 2 insertions(+), 1 deletions(-)
+
+ diff --git a/.d6/f1 b/.d6/f1
+ deleted file mode 100644
+ --- a/.d6/f1
+ +++ /dev/null
+ @@ -1,1 +0,0 @@
+ -1
+ diff --git a/d1/f1 b/d1/f1
+ --- a/d1/f1
+ +++ b/d1/f1
+ @@ -1,1 +1,2 @@
+ 1
+ +2
+ diff --git a/d1/f2 b/d1/f2
+ new file mode 100644
+ --- /dev/null
+ +++ b/d1/f2
+ @@ -0,0 +1,1 @@
+ +2
+
$ hg log -r 'wdir()' -Tjson
[
{