mercurial/subrepo.py
changeset 14041 bcc6ed0f6c3b
parent 13972 d1f4e7fd970a
child 14047 30ccb7d03864
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]