diff 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
line wrap: on
line diff
--- a/mercurial/subrepo.py	Thu Jun 30 12:55:19 2011 -0500
+++ b/mercurial/subrepo.py	Thu Jun 30 13:22:12 2011 -0500
@@ -663,7 +663,9 @@
         args = ['checkout']
         if self._svnversion >= (1, 5):
             args.append('--force')
-        args.extend([state[0], '--revision', state[1]])
+        # The revision must be specified at the end of the URL to properly
+        # update to a directory which has since been deleted and recreated.
+        args.append('%s@%s' % (state[0], state[1]))
         status, err = self._svncommand(args, failok=True)
         if not re.search('Checked out revision [0-9]+.', status):
             if ('is already a working copy for a different URL' in err