##// END OF EJS Templates
largefiles: convert EOL of hgrc before appending to bytes IO...
Yuya Nishihara -
r35641:f56f8abb default
parent child Browse files
Show More
@@ -888,8 +888,8 def hgclone(orig, ui, opts, *args, **kwa
888 888
889 889 # If largefiles is required for this repo, permanently enable it locally
890 890 if 'largefiles' in repo.requirements:
891 with repo.vfs('hgrc', 'a', text=True) as fp:
892 fp.write('\n[extensions]\nlargefiles=\n')
891 repo.vfs.append('hgrc',
892 util.tonativeeol('\n[extensions]\nlargefiles=\n'))
893 893
894 894 # Caching is implicitly limited to 'rev' option, since the dest repo was
895 895 # truncated at that point. The user may expect a download count with
@@ -907,8 +907,8 def hgpostshare(orig, sourcerepo, destre
907 907
908 908 # If largefiles is required for this repo, permanently enable it locally
909 909 if 'largefiles' in destrepo.requirements:
910 with destrepo.vfs('hgrc', 'a+', text=True) as fp:
911 fp.write('\n[extensions]\nlargefiles=\n')
910 destrepo.vfs.append('hgrc',
911 util.tonativeeol('\n[extensions]\nlargefiles=\n'))
912 912
913 913 def overriderebase(orig, ui, repo, **opts):
914 914 if not util.safehasattr(repo, '_largefilesenabled'):
General Comments 0
You need to be logged in to leave comments. Login now