comparison 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
comparison
equal deleted inserted replaced
13526:8ac1260941c0 13531:67fbe566eff1
623 pass 623 pass
624 624
625 def get(self, state, overwrite=False): 625 def get(self, state, overwrite=False):
626 if overwrite: 626 if overwrite:
627 self._svncommand(['revert', '--recursive']) 627 self._svncommand(['revert', '--recursive'])
628 status = self._svncommand(['checkout', state[0], '--revision', state[1]]) 628 status = self._svncommand(['checkout', '--force', state[0],
629 '--revision', state[1]])
629 if not re.search('Checked out revision [0-9]+.', status): 630 if not re.search('Checked out revision [0-9]+.', status):
630 raise util.Abort(status.splitlines()[-1]) 631 raise util.Abort(status.splitlines()[-1])
631 self._ui.status(status) 632 self._ui.status(status)
632 633
633 def merge(self, state): 634 def merge(self, state):