diff mercurial/subrepo.py @ 13531:67fbe566eff1 stable

subrepo: handle svn tracked/unknown directory collisions This happens more often than expected. Say you have an svn subrepository with python code. Python would have generated unknown .pyc files. Now, you rebase this setup on a revision where a directory containing python code does not exist. Subversion is first asked to remove this directory when updating, but will not because it contains untracked items. Then it will have to bring back the directory after the merge but will fail because it now collides with an untracked directory. Using --force is not very elegant but it is much simpler than rewriting our own purge command for subversion.
author Patrick Mezard <pmezard@gmail.com>
date Fri, 04 Mar 2011 14:00:49 +0100
parents f2295f7cd468
children d4c2f2ac3ff7 dea6efdd7ec4
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Mar 02 21:57:20 2011 -0600
+++ b/mercurial/subrepo.py	Fri Mar 04 14:00:49 2011 +0100
@@ -625,7 +625,8 @@
     def get(self, state, overwrite=False):
         if overwrite:
             self._svncommand(['revert', '--recursive'])
-        status = self._svncommand(['checkout', state[0], '--revision', state[1]])
+        status = self._svncommand(['checkout', '--force', state[0],
+                                   '--revision', state[1]])
         if not re.search('Checked out revision [0-9]+.', status):
             raise util.Abort(status.splitlines()[-1])
         self._ui.status(status)