subrepo: test & fix svn subrepo removal stable
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
Fri, 05 Nov 2010 15:13:22 +0100
branchstable
changeset 12930 9bb180abc4d0
parent 12911 f766882000c7
child 12931 7ff1c4542b9d
child 12932 ab93029ab622
subrepo: test & fix svn subrepo removal
mercurial/subrepo.py
tests/test-subrepo-svn.t
--- a/mercurial/subrepo.py	Mon Nov 01 17:40:17 2010 -0500
+++ b/mercurial/subrepo.py	Fri Nov 05 15:13:22 2010 +0100
@@ -549,7 +549,7 @@
                             'it has changes.\n' % self._path))
             return
         self._ui.note(_('removing subrepo %s\n') % self._path)
-        shutil.rmtree(self._ctx.repo.join(self._path))
+        shutil.rmtree(self._ctx._repo.wjoin(self._path))
 
     def get(self, state):
         status = self._svncommand(['checkout', state[0], '--revision', state[1]])
--- a/tests/test-subrepo-svn.t	Mon Nov 01 17:40:17 2010 -0500
+++ b/tests/test-subrepo-svn.t	Fri Nov 05 15:13:22 2010 +0100
@@ -217,3 +217,8 @@
 
   $ python -c "import os.path; print os.path.exists('s')"
   True
+
+update to nullrev (must delete the subrepo)
+
+  $ hg up null
+  0 files updated, 0 files merged, 3 files removed, 0 files unresolved