Patchwork [2,of,2] tests: add test of "log -r wdir() -p" (issue4871)

login
register
mail settings
Submitter Yuya Nishihara
Date March 16, 2016, 3:54 p.m.
Message ID <3f6072e4ba4e052d30c3.1458143692@mimosa>
Download mbox | patch
Permalink /patch/13916/
State Accepted
Headers show

Comments

Yuya Nishihara - March 16, 2016, 3:54 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1457879247 -32400
#      Sun Mar 13 23:27:27 2016 +0900
# Node ID 3f6072e4ba4e052d30c3fa636a67318d5400ed5c
# Parent  732c1c6b8c835f8cafe40c20730d8bb2eb7ea81a
tests: add test of "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.
Pierre-Yves David - March 19, 2016, 6:16 a.m.
On 03/16/2016 08:54 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1457879247 -32400
> #      Sun Mar 13 23:27:27 2016 +0900
> # Node ID 3f6072e4ba4e052d30c3fa636a67318d5400ed5c
> # Parent  732c1c6b8c835f8cafe40c20730d8bb2eb7ea81a
> tests: add test of "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.

This is pushed to the clowncopter, thanks.

Patch

diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -1788,6 +1788,14 @@  clean:
   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 @@  dirty:
   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
   [
    {