Patchwork [3,of,5] transplant: add test for interactive transplant

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Nov. 18, 2013, 10:43 a.m.
Message ID <c715df7c1ba18733570c.1384771437@juju>
Download mbox | patch
Permalink /patch/3054/
State Superseded
Headers show

Comments

Katsunori FUJIWARA - Nov. 18, 2013, 10:43 a.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1384770812 -32400
#      Mon Nov 18 19:33:32 2013 +0900
# Node ID c715df7c1ba18733570c12937f7421042fe932dc
# Parent  3c1e94039732a14f2f276dca792227c8b750c953
transplant: add test for interactive transplant
Simon Heimberg - Nov. 19, 2013, 2:05 a.m.
++ for this patch series

On 18.11.2013 11:43, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1384770812 -32400
> #      Mon Nov 18 19:33:32 2013 +0900
> # Node ID c715df7c1ba18733570c12937f7421042fe932dc
> # Parent  3c1e94039732a14f2f276dca792227c8b750c953
> transplant: add test for interactive transplant
>
> diff --git a/tests/test-transplant.t b/tests/test-transplant.t
> --- a/tests/test-transplant.t
> +++ b/tests/test-transplant.t
> @@ -444,6 +444,67 @@
>     applying a53251cdf717
>     4:a53251cdf717 merged at 4831f4dc831a
>
> +test interactive transplant
> +
> +  $ hg --config extensions.mq= -q strip 0

extensions.strip= instead of extensions.mq= is nicer. strip is now in a 
separate extension. It is also loaded by mq, so above works.

> +  $ hg -R ../t log -G --template "{rev}:{node|short}"
> +  @  4:a53251cdf717
> +  |
> +  o  3:722f4667af76
> +  |
> +  o  2:37a1297eb21b
> +  |
> +  | o  1:d11e3596cc1a
> +  |/
> +  o  0:17ab29e464c6
> +
> +  $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
> +  > p
> +  > y
> +  > n
> +  > n
> +  > m
> +  > c
> +  > EOF
> +  0:17ab29e464c6
> +  apply changeset? [ynmpcq?]: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +  +++ b/r1	Thu Jan 01 00:00:00 1970 +0000
> +  @@ -0,0 +1,1 @@
> +  +r1
> +  apply changeset? [ynmpcq?]: 1:d11e3596cc1a
> +  apply changeset? [ynmpcq?]: 2:37a1297eb21b
> +  apply changeset? [ynmpcq?]: 3:722f4667af76
> +  apply changeset? [ynmpcq?]: 4:a53251cdf717
> +  apply changeset? [ynmpcq?]:  (no-eol)
> +  $ hg log -G --template "{node|short}"
> +  @    88be5dde5260
> +  |\
> +  | o  722f4667af76
> +  | |
> +  | o  37a1297eb21b
> +  |/
> +  o  17ab29e464c6
> +
> +  $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
> +  > x
> +  > ?
> +  > y
> +  > q
> +  > EOF
> +  1:d11e3596cc1a
> +  apply changeset? [ynmpcq?]: no such option
> +  apply changeset? [ynmpcq?]: y: transplant this changeset
> +  n: skip this changeset
> +  m: merge at this changeset
> +  p: show patch
> +  c: commit selected changesets
> +  q: cancel transplant
> +  ?: show this help
> +  apply changeset? [ynmpcq?]: 4:a53251cdf717
> +  apply changeset? [ynmpcq?]:  (no-eol)
> +  $ hg heads --template "{node|short}\n"
> +  88be5dde5260
> +
>     $ cd ..
>
>
>
Katsunori FUJIWARA - Nov. 22, 2013, 1:41 p.m.
At Tue, 19 Nov 2013 03:05:46 +0100,
Simon Heimberg wrote:
> 
> ++ for this patch series
> 
> On 18.11.2013 11:43, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> > # Date 1384770812 -32400
> > #      Mon Nov 18 19:33:32 2013 +0900
> > # Node ID c715df7c1ba18733570c12937f7421042fe932dc
> > # Parent  3c1e94039732a14f2f276dca792227c8b750c953
> > transplant: add test for interactive transplant
> >
> > diff --git a/tests/test-transplant.t b/tests/test-transplant.t
> > --- a/tests/test-transplant.t
> > +++ b/tests/test-transplant.t
> > @@ -444,6 +444,67 @@
> >     applying a53251cdf717
> >     4:a53251cdf717 merged at 4831f4dc831a
> >
> > +test interactive transplant
> > +
> > +  $ hg --config extensions.mq= -q strip 0
> 
> extensions.strip= instead of extensions.mq= is nicer. strip is now in a 
> separate extension. It is also loaded by mq, so above works.

Oops, I forgot that "hg strip" function is now provided by strip
extension while working this patch series :-)

I'll post revised version, soon.

> > +  $ hg -R ../t log -G --template "{rev}:{node|short}"
> > +  @  4:a53251cdf717
> > +  |
> > +  o  3:722f4667af76
> > +  |
> > +  o  2:37a1297eb21b
> > +  |
> > +  | o  1:d11e3596cc1a
> > +  |/
> > +  o  0:17ab29e464c6
> > +
> > +  $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
> > +  > p
> > +  > y
> > +  > n
> > +  > n
> > +  > m
> > +  > c
> > +  > EOF
> > +  0:17ab29e464c6
> > +  apply changeset? [ynmpcq?]: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> > +  +++ b/r1	Thu Jan 01 00:00:00 1970 +0000
> > +  @@ -0,0 +1,1 @@
> > +  +r1
> > +  apply changeset? [ynmpcq?]: 1:d11e3596cc1a
> > +  apply changeset? [ynmpcq?]: 2:37a1297eb21b
> > +  apply changeset? [ynmpcq?]: 3:722f4667af76
> > +  apply changeset? [ynmpcq?]: 4:a53251cdf717
> > +  apply changeset? [ynmpcq?]:  (no-eol)
> > +  $ hg log -G --template "{node|short}"
> > +  @    88be5dde5260
> > +  |\
> > +  | o  722f4667af76
> > +  | |
> > +  | o  37a1297eb21b
> > +  |/
> > +  o  17ab29e464c6
> > +
> > +  $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
> > +  > x
> > +  > ?
> > +  > y
> > +  > q
> > +  > EOF
> > +  1:d11e3596cc1a
> > +  apply changeset? [ynmpcq?]: no such option
> > +  apply changeset? [ynmpcq?]: y: transplant this changeset
> > +  n: skip this changeset
> > +  m: merge at this changeset
> > +  p: show patch
> > +  c: commit selected changesets
> > +  q: cancel transplant
> > +  ?: show this help
> > +  apply changeset? [ynmpcq?]: 4:a53251cdf717
> > +  apply changeset? [ynmpcq?]:  (no-eol)
> > +  $ hg heads --template "{node|short}\n"
> > +  88be5dde5260
> > +
> >     $ cd ..
> >
> >
> >
> 
> 

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy@lares.dti.ne.jp

Patch

diff --git a/tests/test-transplant.t b/tests/test-transplant.t
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -444,6 +444,67 @@ 
   applying a53251cdf717
   4:a53251cdf717 merged at 4831f4dc831a
 
+test interactive transplant
+
+  $ hg --config extensions.mq= -q strip 0
+  $ hg -R ../t log -G --template "{rev}:{node|short}"
+  @  4:a53251cdf717
+  |
+  o  3:722f4667af76
+  |
+  o  2:37a1297eb21b
+  |
+  | o  1:d11e3596cc1a
+  |/
+  o  0:17ab29e464c6
+  
+  $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
+  > p
+  > y
+  > n
+  > n
+  > m
+  > c
+  > EOF
+  0:17ab29e464c6
+  apply changeset? [ynmpcq?]: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/r1	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,1 @@
+  +r1
+  apply changeset? [ynmpcq?]: 1:d11e3596cc1a
+  apply changeset? [ynmpcq?]: 2:37a1297eb21b
+  apply changeset? [ynmpcq?]: 3:722f4667af76
+  apply changeset? [ynmpcq?]: 4:a53251cdf717
+  apply changeset? [ynmpcq?]:  (no-eol)
+  $ hg log -G --template "{node|short}"
+  @    88be5dde5260
+  |\
+  | o  722f4667af76
+  | |
+  | o  37a1297eb21b
+  |/
+  o  17ab29e464c6
+  
+  $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
+  > x
+  > ?
+  > y
+  > q
+  > EOF
+  1:d11e3596cc1a
+  apply changeset? [ynmpcq?]: no such option
+  apply changeset? [ynmpcq?]: y: transplant this changeset
+  n: skip this changeset
+  m: merge at this changeset
+  p: show patch
+  c: commit selected changesets
+  q: cancel transplant
+  ?: show this help
+  apply changeset? [ynmpcq?]: 4:a53251cdf717
+  apply changeset? [ynmpcq?]:  (no-eol)
+  $ hg heads --template "{node|short}\n"
+  88be5dde5260
+
   $ cd ..