Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 14820:7ef125fa9b35 stable
subrepo: correct revision in svn checkout
A Subversion subrepo checkout uses a url and --revision which does not do the
correct thing when specifying a revision of a branch that has since been
deleted and recreated. The checkout needs to specify the revision as URL@REV
instead.
author | Eli Carter <eli.carter@tektronix.com> |
---|---|
date | Thu, 30 Jun 2011 13:22:12 -0500 |
parents | 4f56b7530eab |
children | 95ced9f5bf29 |
comparison
equal
deleted
inserted
replaced
14819:b30c889584ef | 14820:7ef125fa9b35 |
---|---|
661 if overwrite: | 661 if overwrite: |
662 self._svncommand(['revert', '--recursive']) | 662 self._svncommand(['revert', '--recursive']) |
663 args = ['checkout'] | 663 args = ['checkout'] |
664 if self._svnversion >= (1, 5): | 664 if self._svnversion >= (1, 5): |
665 args.append('--force') | 665 args.append('--force') |
666 args.extend([state[0], '--revision', state[1]]) | 666 # The revision must be specified at the end of the URL to properly |
667 # update to a directory which has since been deleted and recreated. | |
668 args.append('%s@%s' % (state[0], state[1])) | |
667 status, err = self._svncommand(args, failok=True) | 669 status, err = self._svncommand(args, failok=True) |
668 if not re.search('Checked out revision [0-9]+.', status): | 670 if not re.search('Checked out revision [0-9]+.', status): |
669 if ('is already a working copy for a different URL' in err | 671 if ('is already a working copy for a different URL' in err |
670 and (self._wcchanged() == (False, False))): | 672 and (self._wcchanged() == (False, False))): |
671 # obstructed but clean working copy, so just blow it away. | 673 # obstructed but clean working copy, so just blow it away. |