[PATCH 1 of 2 DEFAULT REVIEW] tests: add test for behavior of forget for explicit path in subrepo

David M. Carr david at carrclan.us
Sun Nov 6 14:48:29 CST 2011


# HG changeset patch
# User David M. Carr  <david at carrclan.us>
# Date 1320523778 14400
# Node ID f196387b7e519860554c9a0d24fa9d327d643e29
# Parent  afc02adf4ded2537e3b6447d9d3767010d742631
tests: add test for behavior of forget for explicit path in subrepo

Adds a section to test-subrepo.t that demonstrates the current behavior
when you pass the full path to a file in a subrepo to hg forget.

diff -r afc02adf4ded -r f196387b7e51 tests/test-subrepo.t
--- a/tests/test-subrepo.t	Thu Nov 03 12:58:30 2011 -0500
+++ b/tests/test-subrepo.t	Sat Nov 05 16:09:38 2011 -0400
@@ -885,8 +885,8 @@
   
 Test behavior of add for explicit path in subrepo:
   $ cd ..
-  $ hg init addtests
-  $ cd addtests
+  $ hg init explicit
+  $ cd explicit
   $ echo s = s > .hgsub
   $ hg add .hgsub
   $ hg init s
@@ -1004,4 +1004,14 @@
   $ hg ci -Am6
   adding fn16
   committing subrepository s
-  $ cd ..
+
+Test behavior of forget for explicit path in subrepo:
+Forgetting an explicit path in a subrepo currently gives a file untracked warn
+  $ echo c19 > s/f19
+  $ hg add s/f19
+  $ hg st -S
+  A s/f19
+  $ hg forget s/f19
+  not removing s/f19: file is already untracked
+  [1]
+  $ rm s/f19


More information about the Mercurial-devel mailing list