##// 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 def clone(ui, peeropts, source, dest=Non
681 681 destrepo = destpeer.local()
682 682 if destrepo:
683 683 template = uimod.samplehgrcs['cloned']
684 fp = destrepo.vfs("hgrc", "wb")
685 684 u = util.url(abspath)
686 685 u.passwd = None
687 686 defaulturl = bytes(u)
688 fp.write(util.tonativeeol(template % defaulturl))
689 fp.close()
690
687 destrepo.vfs.write('hgrc', util.tonativeeol(template % defaulturl))
691 688 destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone')
692 689
693 690 if ui.configbool('experimental', 'remotenames'):
General Comments 0
You need to be logged in to leave comments. Login now