diff -r 48fd1dfb99aa -r 7cc77030c557 mercurial/subrepo.py --- a/mercurial/subrepo.py Wed Jan 14 20:29:47 2015 -0800 +++ b/mercurial/subrepo.py Thu Jan 15 23:17:12 2015 +0100 @@ -614,7 +614,7 @@ if defpath != defpushpath: addpathconfig('default-push', defpushpath) - fp = self._repo.opener("hgrc", "w", text=True) + fp = self._repo.vfs("hgrc", "w", text=True) try: fp.write(''.join(lines)) finally: