mercurial/subrepo.py
changeset 23364 83736508e98a
parent 23363 55525924af43
child 23365 2ff394bbfa74
equal deleted inserted replaced
23363:55525924af43 23364:83736508e98a
   520     def __init__(self, ctx, path, state):
   520     def __init__(self, ctx, path, state):
   521         self._path = path
   521         self._path = path
   522         self._state = state
   522         self._state = state
   523         r = ctx._repo
   523         r = ctx._repo
   524         root = r.wjoin(path)
   524         root = r.wjoin(path)
   525         create = not os.path.exists(os.path.join(root, '.hg'))
   525         create = not r.wvfs.exists('%s/.hg' % path)
   526         self._repo = hg.repository(r.baseui, root, create=create)
   526         self._repo = hg.repository(r.baseui, root, create=create)
   527         for s, k in [('ui', 'commitsubrepos')]:
   527         for s, k in [('ui', 'commitsubrepos')]:
   528             v = r.ui.config(s, k)
   528             v = r.ui.config(s, k)
   529             if v:
   529             if v:
   530                 self._repo.ui.setconfig(s, k, v, 'subrepo')
   530                 self._repo.ui.setconfig(s, k, v, 'subrepo')