mercurial/subrepo.py
changeset 14049 92db9667d15a
parent 14047 30ccb7d03864
child 14052 ecaa78594983
equal deleted inserted replaced
14048:58e58406ed19 14049:92db9667d15a
   628     def get(self, state, overwrite=False):
   628     def get(self, state, overwrite=False):
   629         if overwrite:
   629         if overwrite:
   630             self._svncommand(['revert', '--recursive'])
   630             self._svncommand(['revert', '--recursive'])
   631         status = self._svncommand(['checkout', state[0], '--revision', state[1]])
   631         status = self._svncommand(['checkout', state[0], '--revision', state[1]])
   632         if not re.search('Checked out revision [0-9]+.', status):
   632         if not re.search('Checked out revision [0-9]+.', status):
   633             # catch the case where the checkout operation is
   633             raise util.Abort(status.splitlines()[-1])
   634             # obstructed but the working copy is clean
       
   635             if ('already a working copy for a different' in status and
       
   636                 not self.dirty()):
       
   637                 self.remove()
       
   638                 self.get(state, overwrite)
       
   639                 return
       
   640             else:
       
   641                 raise util.Abort(status.splitlines()[-1])
       
   642         self._ui.status(status)
   634         self._ui.status(status)
   643 
   635 
   644     def merge(self, state):
   636     def merge(self, state):
   645         old = self._state[1]
   637         old = self._state[1]
   646         new = state[1]
   638         new = state[1]