##// END OF EJS Templates
clone: use utility function to write hgrc
Yuya Nishihara -
r35638:545967ec default
parent child Browse files
Show More
@@ -681,13 +681,10 b' def clone(ui, peeropts, source, dest=Non'
681 destrepo = destpeer.local()
681 destrepo = destpeer.local()
682 if destrepo:
682 if destrepo:
683 template = uimod.samplehgrcs['cloned']
683 template = uimod.samplehgrcs['cloned']
684 fp = destrepo.vfs("hgrc", "wb")
685 u = util.url(abspath)
684 u = util.url(abspath)
686 u.passwd = None
685 u.passwd = None
687 defaulturl = bytes(u)
686 defaulturl = bytes(u)
688 fp.write(util.tonativeeol(template % defaulturl))
687 destrepo.vfs.write('hgrc', util.tonativeeol(template % defaulturl))
689 fp.close()
690
691 destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone')
688 destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone')
692
689
693 if ui.configbool('experimental', 'remotenames'):
690 if ui.configbool('experimental', 'remotenames'):
General Comments 0
You need to be logged in to leave comments. Login now