[PATCH 1 of 3] tests: add test for add of explicit path in subrepo

David M. Carr david at carrclan.us
Tue Nov 1 01:56:46 UTC 2011


# HG changeset patch
# User David M. Carr  <david at carrclan.us>
# Date 1320027116 14400
# Branch stable
# Node ID 7ea4f7ac5854aa6e301dd2ef19667b3b5c4bb796
# Parent  87248de091352f746e8cd1cee01af29138c8e443
tests: add test for add of explicit path in subrepo

Add test coverage for the existing behavior where adds of explicit paths in
subrepos are silently ignored.  This is in preparation for changing the
behavior of the add command to have better support for subrepos.

diff -r 87248de09135 -r 7ea4f7ac5854 tests/test-subrepo.t
--- a/tests/test-subrepo.t	Sun Oct 30 12:10:11 2011 -0500
+++ b/tests/test-subrepo.t	Sun Oct 30 22:11:56 2011 -0400
@@ -883,3 +883,25 @@
   rm2
   
   
+Test behavior of add for explicit path in subrepo:
+  $ cd ..
+  $ hg init addtests
+  $ cd addtests
+  $ echo s = s > .hgsub
+  $ hg add .hgsub
+  $ hg init s
+  $ hg ci -ma0
+  committing subrepository s
+  $ echo a > s/a
+  $ hg st -S
+  ? s/a
+  $ hg add s/a
+  $ hg st -S
+  ? s/a
+  $ hg add -S s/a
+  $ hg st -S
+  A s/a
+  $ hg ci -R s -ms0
+  $ hg ci -ma1
+  committing subrepository s
+  $ cd ..


More information about the Mercurial-devel mailing list