Patchwork [5,of,5] test-subrepo-recursion: add pull and clone --subrev tests

login
register
mail settings
Submitter Angel Ezquerra
Date Nov. 23, 2013, 8:28 p.m.
Message ID <be8eed7d2b203f847d6b.1385238484@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/3116/
State Superseded
Headers show

Comments

Angel Ezquerra - Nov. 23, 2013, 8:28 p.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1361576001 -3600
#      Sat Feb 23 00:33:21 2013 +0100
# Node ID be8eed7d2b203f847d6bf6012e7618f94e6aff9f
# Parent  1dfe3011f816afbd233f559bfe0afefcf7ab9b0c
test-subrepo-recursion: add pull and clone --subrev tests
Angel Ezquerra - Jan. 16, 2014, 9:14 p.m.
Forwarding Pierre-Yves' answer to the list:

---------- Forwarded message ----------
From: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Wed, Jan 15, 2014 at 2:26 PM
Subject: Re: [PATCH 5 of 5] test-subrepo-recursion: add pull and clone
--subrev tests
To: Angel Ezquerra <angel.ezquerra@gmail.com>


On 11/23/2013 12:28 PM, Angel Ezquerra wrote:
>
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra@gmail.com>
> # Date 1361576001 -3600
> #      Sat Feb 23 00:33:21 2013 +0100
> # Node ID be8eed7d2b203f847d6bf6012e7618f94e6aff9f
> # Parent  1dfe3011f816afbd233f559bfe0afefcf7ab9b0c
> test-subrepo-recursion: add pull and clone --subrev tests


Why is these not in the same revision than the ones adding the features ?
Angel Ezquerra - Jan. 16, 2014, 9:15 p.m.
On Wed, Jan 15, 2014 at 2:26 PM, Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
> On 11/23/2013 12:28 PM, Angel Ezquerra wrote:
>>
>> # HG changeset patch
>> # User Angel Ezquerra <angel.ezquerra@gmail.com>
>> # Date 1361576001 -3600
>> #      Sat Feb 23 00:33:21 2013 +0100
>> # Node ID be8eed7d2b203f847d6bf6012e7618f94e6aff9f
>> # Parent  1dfe3011f816afbd233f559bfe0afefcf7ab9b0c
>> test-subrepo-recursion: add pull and clone --subrev tests
>
>
> Why is these not in the same revision than the ones adding the features ?
>

I could split the two tests introduced in this revision and place each
of them on the revision that introduces the corresponding feature
(pull-S and clone -S).

Cheers,

Angel

Patch

# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1361576001 -3600
#      Sat Feb 23 00:33:21 2013 +0100
# Node ID be8eed7d2b203f847d6bf6012e7618f94e6aff9f
# Parent  1dfe3011f816afbd233f559bfe0afefcf7ab9b0c
test-subrepo-recursion: add pull and clone --subrev tests

diff --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t
--- a/tests/test-subrepo-recursion.t
+++ b/tests/test-subrepo-recursion.t
@@ -479,8 +479,61 @@ 
   abort: cannot combine --bundle and --subrepos
   [255]
 
+Test pull -S:
+
+  $ hg init toto
+  $ cd toto
+  $ echo w > w.txt
+  $ hg add w.txt
+  $ hg commit -m 'b1'
+  $ cd ..
+  $ echo 'toto = toto' >> .hgsub
+  $ hg commit -S -m "3-b1"
+  $ cd ..
+  $ hg clone -U -r 0 repo repo3
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 3 changes to 3 files
+  $ cd repo3
+  $ hg pull -S .
+  pulling from $TESTTMP/repo (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 4 changes to 2 files
+  (run 'hg update' to get a working copy)
+  $ hg pull -S 1
+  pulling from $TESTTMP/repo (glob)
+  searching for changes
+  no changes found
+  cloning subrepo foo from file://$TESTTMP/repo/foo (glob)
+  cloning subrepo bar from $TESTTMP/repo/foo/bar (glob)
+  $ hg update -r 1
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg pull -S .:
+  pulling from $TESTTMP/repo (glob)
+  searching for changes
+  no changes found
+  pulling subrepo foo from file://$TESTTMP/repo/foo (glob)
+  searching for changes
+  no changes found
+  cloning subrepo toto from file://$TESTTMP/repo/toto (glob)
+  $ hg update
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+Test clone -S:
+
+  $ cd ..
+  $ hg clone -U -S '.::' repo repo4
+  cloning subrepo foo from repo/foo (glob)
+  cloning subrepo bar from $TESTTMP/repo/foo/bar (glob)
+  cloning subrepo toto from repo/toto (glob)
+
 Test missing subrepo:
 
+  $ cd repo
   $ rm -r foo
   $ hg status -S
   warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"