diff -r d99d0b559084 -r 5884812686f7 mercurial/subrepo.py --- a/mercurial/subrepo.py Fri Jul 06 14:12:42 2012 -0500 +++ b/mercurial/subrepo.py Fri Jul 13 21:46:53 2012 +0200 @@ -503,9 +503,10 @@ % (subrelpath(self), srcurl)) parentrepo = self._repo._subparent shutil.rmtree(self._repo.path) - other, self._repo = hg.clone(self._repo._subparent.ui, {}, - other, self._repo.root, - update=False) + other, cloned = hg.clone(self._repo._subparent.ui, {}, + other, self._repo.root, + update=False) + self._repo = cloned.local() self._initrepo(parentrepo, source, create=True) else: self._repo.ui.status(_('pulling subrepo %s from %s\n')