[PATCH 5 of 5] test-subrepo-recursion: add pull and clone --subrev tests
Angel Ezquerra
angel.ezquerra at gmail.com
Sat Nov 23 14:28:04 CST 2013
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at 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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg-2.4-5.patch
Type: text/x-patch
Size: 2167 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20131123/ca8d58f9/attachment.bin>
More information about the Mercurial-devel
mailing list