Patchwork [2,of,5,V2] test-merge-prompt: replace repeated --config ui.interactive=true by hgrc file

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 10, 2014, 3:09 p.m.
Message ID <6181d856ed3603a764cb.1412953758@mimosa>
Download mbox | patch
Permalink /patch/6175/
State Rejected
Headers show

Comments

Yuya Nishihara - Oct. 10, 2014, 3:09 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1412948472 -32400
#      Fri Oct 10 22:41:12 2014 +0900
# Node ID 6181d856ed3603a764cbcb24f934dee9abb9f7a5
# Parent  8403d22546cca774976cca9e400d8df0e949b355
test-merge-prompt: replace repeated --config ui.interactive=true by hgrc file
Mads Kiilerich - Oct. 10, 2014, 5:07 p.m.
Patch 1 LGTM but

On 10/10/2014 05:09 PM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1412948472 -32400
> #      Fri Oct 10 22:41:12 2014 +0900
> # Node ID 6181d856ed3603a764cbcb24f934dee9abb9f7a5
> # Parent  8403d22546cca774976cca9e400d8df0e949b355
> test-merge-prompt: replace repeated --config ui.interactive=true by hgrc file

Hmm. interactive=true should only be used when there actually is 
relevant input on stdin. I think it is nice to have that explicit. 
Having it in hgrc is unexpected and could lead to confusing results when 
trying to modify the tests later on.

-1.

/Mads

> diff --git a/tests/test-merge-prompt.t b/tests/test-merge-prompt.t
> --- a/tests/test-merge-prompt.t
> +++ b/tests/test-merge-prompt.t
> @@ -63,10 +63,15 @@ Non-interactive merge:
>   
>   Interactive merge:
>   
> +  $ cat <<EOF >> $HGRCPATH
> +  > [ui]
> +  > interactive = true
> +  > EOF
> +
>     $ hg co -C
>     0 files updated, 0 files merged, 1 files removed, 0 files unresolved
>   
> -  $ hg merge --config ui.interactive=true <<EOF
> +  $ hg merge <<EOF
>     > c
>     > d
>     > EOF
> @@ -92,7 +97,7 @@ Interactive merge with bad input:
>     $ hg co -C
>     0 files updated, 0 files merged, 0 files removed, 0 files unresolved
>   
> -  $ hg merge --config ui.interactive=true <<EOF
> +  $ hg merge <<EOF
>     > foo
>     > bar
>     > d
> @@ -130,7 +135,7 @@ Interactive merge with not enough input:
>     $ hg co -C
>     1 files updated, 0 files merged, 1 files removed, 0 files unresolved
>   
> -  $ hg merge --config ui.interactive=true <<EOF
> +  $ hg merge <<EOF
>     > d
>     > EOF
>     local changed file1 which remote deleted
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-merge-prompt.t b/tests/test-merge-prompt.t
--- a/tests/test-merge-prompt.t
+++ b/tests/test-merge-prompt.t
@@ -63,10 +63,15 @@  Non-interactive merge:
 
 Interactive merge:
 
+  $ cat <<EOF >> $HGRCPATH
+  > [ui]
+  > interactive = true
+  > EOF
+
   $ hg co -C
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
 
-  $ hg merge --config ui.interactive=true <<EOF
+  $ hg merge <<EOF
   > c
   > d
   > EOF
@@ -92,7 +97,7 @@  Interactive merge with bad input:
   $ hg co -C
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-  $ hg merge --config ui.interactive=true <<EOF
+  $ hg merge <<EOF
   > foo
   > bar
   > d
@@ -130,7 +135,7 @@  Interactive merge with not enough input:
   $ hg co -C
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
 
-  $ hg merge --config ui.interactive=true <<EOF
+  $ hg merge <<EOF
   > d
   > EOF
   local changed file1 which remote deleted