mercurial/subrepo.py
branchstable
changeset 14820 7ef125fa9b35
parent 14766 4f56b7530eab
child 14898 95ced9f5bf29
--- 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