Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 14041:bcc6ed0f6c3b
svn subrepo: attempt work around obstructed checkouts (issue2752)
It should be possible to do better than this with 'svn switch', but
the logic required woud be significantly more complex. Until someone
needs the performance improvements of using switch, we'll just use the
same strategy for everything.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 29 Apr 2011 03:34:18 -0500 |
parents | d1f4e7fd970a |
children | 30ccb7d03864 |
comparison
equal
deleted
inserted
replaced
14040:9d2be7e17fc1 | 14041:bcc6ed0f6c3b |
---|---|
619 def get(self, state, overwrite=False): | 619 def get(self, state, overwrite=False): |
620 if overwrite: | 620 if overwrite: |
621 self._svncommand(['revert', '--recursive']) | 621 self._svncommand(['revert', '--recursive']) |
622 status = self._svncommand(['checkout', state[0], '--revision', state[1]]) | 622 status = self._svncommand(['checkout', state[0], '--revision', state[1]]) |
623 if not re.search('Checked out revision [0-9]+.', status): | 623 if not re.search('Checked out revision [0-9]+.', status): |
624 raise util.Abort(status.splitlines()[-1]) | 624 # catch the case where the checkout operation is |
625 # obstructed but the working copy is clean | |
626 if ('already a working copy for a different' in status and | |
627 not self.dirty()): | |
628 self.remove() | |
629 self.get(state, overwrite) | |
630 return | |
631 else: | |
632 raise util.Abort(status.splitlines()[-1]) | |
625 self._ui.status(status) | 633 self._ui.status(status) |
626 | 634 |
627 def merge(self, state): | 635 def merge(self, state): |
628 old = self._state[1] | 636 old = self._state[1] |
629 new = state[1] | 637 new = state[1] |