# HG changeset patch # User Matt Mackall # Date 2009-12-14 21:01:13 # Node ID 8f14f749f47113da7091d9a78c8d35d05a1b3d1d # Parent a02d43acbc0414bef4988f16de98b7d20d2094bb subrepo: add default path to new clones diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -160,6 +160,9 @@ class hgsubrepo(object): else: util.makedirs(root) self._repo = hg.repository(r.ui, root, create=True) + f = file(os.path.join(root, '.hg', 'hgrc'), 'w') + f.write('[paths]\ndefault = %s\n' % state[0]) + f.close() self._repo._subparent = r self._repo._subsource = state[0]