subrepo: fix update -C with svn subrepos when cwd != repo.root stable
authorPatrick Mezard <pmezard@gmail.com>
Tue, 01 Feb 2011 21:39:28 +0100
branchstable
changeset 13332 927e3940bfc3
parent 13330 551856dea9a6
child 13333 60792fa3c1a8
child 13334 2b2155623ee2
subrepo: fix update -C with svn subrepos when cwd != repo.root
mercurial/subrepo.py
tests/test-subrepo-svn.t
--- a/mercurial/subrepo.py	Tue Feb 01 07:29:11 2011 +0000
+++ b/mercurial/subrepo.py	Tue Feb 01 21:39:28 2011 +0100
@@ -591,7 +591,7 @@
 
     def get(self, state, overwrite=False):
         if overwrite:
-            self._svncommand(['revert', '--recursive', self._path])
+            self._svncommand(['revert', '--recursive'])
         status = self._svncommand(['checkout', state[0], '--revision', state[1]])
         if not re.search('Checked out revision [0-9]+.', status):
             raise util.Abort(status.splitlines()[-1])
--- a/tests/test-subrepo-svn.t	Tue Feb 01 07:29:11 2011 +0000
+++ b/tests/test-subrepo-svn.t	Tue Feb 01 21:39:28 2011 +0100
@@ -280,15 +280,15 @@
   A       f1
   
   Performing status on external item at 'externals'
-  $ cd ..
-  $ hg update -C
+  $ cd ../..
+  $ hg -R t update -C
   
-  Fetching external item into '$TESTTMP/sub/t/s/externals'
+  Fetching external item into 't/s/externals'
   Checked out external at revision 1.
   
   Checked out revision 3.
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd s
+  $ cd t/s
   $ svn status
   ?       a
   X       externals