diff tests/test-subrepo.t @ 13322:c19b9282d3a7 stable

subrepo: make update -C clean the working directory for svn subrepos This makes 'hg update --clean' behave the same way for both kinds of subrepositories. Before Subversion subrepos did not take the clean parameter into account, but just updated to the given revision and merged uncommitted changes into that.
author Erik Zielke <ez@aragost.com>
date Mon, 31 Jan 2011 13:33:41 +0100
parents 0b30e6148ec5
children d4de90a612f7
line wrap: on
line diff
--- a/tests/test-subrepo.t	Fri Jan 28 02:57:59 2011 +0100
+++ b/tests/test-subrepo.t	Mon Jan 31 13:33:41 2011 +0100
@@ -675,3 +675,31 @@
   committing subrepository subrepo-1
   committing subrepository subrepo-2
   $ hg st subrepo-2/file
+
+Check hg update --clean
+  $ cd $TESTTMP/sub/t
+  $ rm -r t/t.orig
+  $ hg status -S --all
+  C .hgsub
+  C .hgsubstate
+  C a
+  C s/.hgsub
+  C s/.hgsubstate
+  C s/a
+  C s/ss/a
+  C t/t
+  $ echo c1 > s/a
+  $ cd s
+  $ echo c1 > b
+  $ echo c1 > c
+  $ hg add b
+  $ cd ..
+  $ hg status -S
+  M s/a
+  A s/b
+  ? s/c
+  $ hg update -C
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg status -S
+  ? s/b
+  ? s/c