diff -r f254ab6207ae -r 798ab869b2ee mercurial/hg.py --- a/mercurial/hg.py Tue Nov 27 20:56:27 2012 -0500 +++ b/mercurial/hg.py Tue Nov 27 21:31:59 2012 -0500 @@ -171,14 +171,11 @@ r = repository(ui, root) default = srcrepo.ui.config('paths', 'default') - if not default: - # set default to source for being able to clone subrepos - default = os.path.abspath(util.urllocalpath(origsource)) - fp = r.opener("hgrc", "w", text=True) - fp.write("[paths]\n") - fp.write("default = %s\n" % default) - fp.close() - r.ui.setconfig('paths', 'default', default) + if default: + fp = r.opener("hgrc", "w", text=True) + fp.write("[paths]\n") + fp.write("default = %s\n" % default) + fp.close() if update: r.ui.status(_("updating working directory\n"))