[PATCH] subrepo: test & fix svn subrepo removal
Ronny Pfannschmidt
Ronny.Pfannschmidt at gmx.de
Fri Nov 5 09:13:28 CDT 2010
# HG changeset patch
# User Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
# Date 1288966402 -3600
# Node ID 41ba533bd96e52991aa9105fce62bd01a203658d
# Parent 515c2786e1cfc4a823458df20118a2072cb27864
subrepo: test & fix svn subrepo removal
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -549,7 +549,7 @@ class svnsubrepo(abstractsubrepo):
'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]])
diff --git a/tests/test-subrepo-svn.t b/tests/test-subrepo-svn.t
--- a/tests/test-subrepo-svn.t
+++ b/tests/test-subrepo-svn.t
@@ -217,3 +217,8 @@ verify subrepo is contained within the r
$ 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
More information about the Mercurial-devel
mailing list