[PATCH 5 of 5 V2] test-subrepo-recursion: add pull and clone --subrepos tests
Angel Ezquerra
angel.ezquerra at gmail.com
Sun Mar 3 15:05:49 CST 2013
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1361576001 -3600
# Node ID 015b18ecf1176a4e9bd3bb12edf49480c3cc56f2
# Parent 3afce3036bc8c06a3aa32d9a54ca2c9c67379153
test-subrepo-recursion: add pull and clone --subrepos 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,57 @@
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 -r 1
+ pulling from $TESTTMP/repo (glob)
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files
+ cloning subrepo foo from file://$TESTTMP/repo/foo (glob)
+ cloning subrepo bar from $TESTTMP/repo/foo/bar (glob)
+ (run 'hg update' to get a working copy)
+ $ hg pull -S
+ pulling from $TESTTMP/repo (glob)
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 2 changesets with 3 changes to 2 files
+ pulling subrepo foo from file://$TESTTMP/repo/foo
+ searching for changes
+ no changes found
+ cloning subrepo toto from file://$TESTTMP/repo/toto
+ (run 'hg update' to get a working copy)
+
+Test clone -S:
+
+ $ cd ..
+ $ hg clone -U -S repo repo4
+ cloning subrepo foo from repo/foo
+ cloning subrepo bar from $TESTTMP/repo/foo/bar
+ cloning subrepo toto from repo/toto
+
Test missing subrepo:
+ $ cd repo
$ rm -r foo
$ hg status -S
warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"
@@ -498,3 +547,4 @@
$ hg add a x/a
$ cd ..
+
More information about the Mercurial-devel
mailing list