Submitter | Yuya Nishihara |
---|---|
Date | Jan. 13, 2018, 5:02 a.m. |
Message ID | <41f5fc043698f6c8ff04.1515819774@mimosa> |
Download | mbox | patch |
Permalink | /patch/26717/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -841,11 +841,7 @@ class hgsubrepo(abstractsubrepo): 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):