mercurial/hg.py
changeset 50191 99faa396e186
parent 50189 6065a8936b00
child 50440 3a2df812e1c7
equal deleted inserted replaced
50190:34db5692d537 50191:99faa396e186
   455     default = defaultpath or sourcerepo.ui.config(b'paths', b'default')
   455     default = defaultpath or sourcerepo.ui.config(b'paths', b'default')
   456     if default:
   456     if default:
   457         template = b'[paths]\ndefault = %s\n'
   457         template = b'[paths]\ndefault = %s\n'
   458         destrepo.vfs.write(b'hgrc', util.tonativeeol(template % default))
   458         destrepo.vfs.write(b'hgrc', util.tonativeeol(template % default))
   459     if requirements.NARROW_REQUIREMENT in sourcerepo.requirements:
   459     if requirements.NARROW_REQUIREMENT in sourcerepo.requirements:
   460         with destrepo.wlock():
   460         with destrepo.wlock(), destrepo.lock(), destrepo.transaction(
       
   461             b"narrow-share"
       
   462         ):
   461             narrowspec.copytoworkingcopy(destrepo)
   463             narrowspec.copytoworkingcopy(destrepo)
   462 
   464 
   463 
   465 
   464 def _postshareupdate(repo, update, checkout=None):
   466 def _postshareupdate(repo, update, checkout=None):
   465     """Maybe perform a working directory update after a shared repo is created.
   467     """Maybe perform a working directory update after a shared repo is created.