mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
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.
This commit is contained in:
parent
7a9d95a376
commit
a2ae5598b9
@ -621,7 +621,15 @@ class svnsubrepo(abstractsubrepo):
|
||||
self._svncommand(['revert', '--recursive'])
|
||||
status = self._svncommand(['checkout', state[0], '--revision', state[1]])
|
||||
if not re.search('Checked out revision [0-9]+.', status):
|
||||
raise util.Abort(status.splitlines()[-1])
|
||||
# catch the case where the checkout operation is
|
||||
# obstructed but the working copy is clean
|
||||
if ('already a working copy for a different' in status and
|
||||
not self.dirty()):
|
||||
self.remove()
|
||||
self.get(state, overwrite)
|
||||
return
|
||||
else:
|
||||
raise util.Abort(status.splitlines()[-1])
|
||||
self._ui.status(status)
|
||||
|
||||
def merge(self, state):
|
||||
|
Loading…
Reference in New Issue
Block a user