# HG changeset patch # User David M. Carr # Date 2011-11-10 00:46:49 # Node ID d90b0b30464b60c4456c5f08ef3690482d32f4b1 # Parent f520c9616db5cfa5f16d997e73680a3b6ceb0583 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 --git a/tests/test-subrepo.t b/tests/test-subrepo.t --- a/tests/test-subrepo.t +++ b/tests/test-subrepo.t @@ -885,8 +885,8 @@ Test that removing .hgsub removes .hgsub 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 @@ Adding with a pattern with -S also adds $ 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