diff tests/test-subrepo-recursion.t @ 15910:2b8d5c55ae67

tests: add subrepo recursion tests for add/forget with explicit paths When support for handling add/forget of explicit paths within subrepos was added (9e99d2bbb1b1/95174c381525), nested subrepos weren't handled properly. This change adds test coverage to expose the broken behavior, which will be fixed in later patches.
author David M. Carr <david@carrclan.us>
date Tue, 17 Jan 2012 19:10:54 -0500
parents d6d7b56ec346
children c654eac03452
line wrap: on
line diff
--- a/tests/test-subrepo-recursion.t	Wed Jan 18 15:07:15 2012 -0600
+++ b/tests/test-subrepo-recursion.t	Tue Jan 17 19:10:54 2012 -0500
@@ -188,6 +188,30 @@
   committing subrepository foo
   committing subrepository foo/bar (glob)
 
+Test explicit path commands within subrepos: add/forget
+  $ echo z1 > foo/bar/z2.txt
+  $ hg status -S
+  ? foo/bar/z2.txt
+  $ hg add foo/bar/z2.txt
+This is expected to add the file, but is currently broken
+  $ hg status -S
+  ? foo/bar/z2.txt
+When fixed, remove the next two commands
+  $ hg add -R foo/bar foo/bar/z2.txt
+  $ hg status -S
+  A foo/bar/z2.txt
+This is expected to forget the file, but is currently broken
+  $ hg forget foo/bar/z2.txt
+  not removing foo/bar/z2.txt: file is already untracked
+  [1]
+  $ hg status -S
+  A foo/bar/z2.txt
+When fixed, remove the next two commands
+  $ hg forget -R foo/bar foo/bar/z2.txt
+  $ hg status -S
+  ? foo/bar/z2.txt
+  $ rm foo/bar/z2.txt
+
 Log with the relationships between repo and its subrepo:
 
   $ hg log --template '{rev}:{node|short} {desc}\n'