Mercurial > hg
comparison mercurial/subrepo.py @ 14049:92db9667d15a
subrepo: backout bcc6ed0f6c3b
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 30 Apr 2011 03:00:38 -0500 |
parents | 30ccb7d03864 |
children | ecaa78594983 |
comparison
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] |