changeset 35621 | 38649e2fbf6c |
parent 35613 | 991f0be9dc39 |
child 35660 | 73f51bdb0fea |
--- a/mercurial/subrepo.py Sat Jan 13 13:24:17 2018 +0900 +++ b/mercurial/subrepo.py Sat Jan 13 13:28:12 2018 +0900 @@ -841,11 +841,7 @@ if defpath != defpushpath: addpathconfig('default-push', defpushpath) - fp = self._repo.vfs("hgrc", "wb", text=True) - try: - fp.write(''.join(lines)) - finally: - fp.close() + self._repo.vfs.write('hgrc', util.tonativeeol(''.join(lines))) @annotatesubrepoerror def add(self, ui, match, prefix, explicitonly, **opts):