##// 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 b' def hgclone(orig, ui, opts, *args, **kwa'
888
888
889 # If largefiles is required for this repo, permanently enable it locally
889 # If largefiles is required for this repo, permanently enable it locally
890 if 'largefiles' in repo.requirements:
890 if 'largefiles' in repo.requirements:
891 with repo.vfs('hgrc', 'a', text=True) as fp:
891 repo.vfs.append('hgrc',
892 fp.write('\n[extensions]\nlargefiles=\n')
892 util.tonativeeol('\n[extensions]\nlargefiles=\n'))
893
893
894 # Caching is implicitly limited to 'rev' option, since the dest repo was
894 # Caching is implicitly limited to 'rev' option, since the dest repo was
895 # truncated at that point. The user may expect a download count with
895 # truncated at that point. The user may expect a download count with
@@ -907,8 +907,8 b' def hgpostshare(orig, sourcerepo, destre'
907
907
908 # If largefiles is required for this repo, permanently enable it locally
908 # If largefiles is required for this repo, permanently enable it locally
909 if 'largefiles' in destrepo.requirements:
909 if 'largefiles' in destrepo.requirements:
910 with destrepo.vfs('hgrc', 'a+', text=True) as fp:
910 destrepo.vfs.append('hgrc',
911 fp.write('\n[extensions]\nlargefiles=\n')
911 util.tonativeeol('\n[extensions]\nlargefiles=\n'))
912
912
913 def overriderebase(orig, ui, repo, **opts):
913 def overriderebase(orig, ui, repo, **opts):
914 if not util.safehasattr(repo, '_largefilesenabled'):
914 if not util.safehasattr(repo, '_largefilesenabled'):
General Comments 0
You need to be logged in to leave comments. Login now