Mercurial > hg
changeset 19897:896a4568def7
vfs: add "open()" for newly added code paths which open files via vfs
This patch replaces "open()" by own "__call__()" defined in derived
classes at the first invocation, for efficiency of succeeding
invocations.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 15 Oct 2013 00:51:04 +0900 |
parents | af03279c766a |
children | 3f92e749d381 |
files | mercurial/scmutil.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Tue Oct 15 00:51:04 2013 +0900 +++ b/mercurial/scmutil.py Tue Oct 15 00:51:04 2013 +0900 @@ -217,6 +217,10 @@ raise return "" + def open(self, path, mode="r", text=False, atomictemp=False): + self.open = self.__call__ + return self.__call__(path, mode, text, atomictemp) + def read(self, path): fp = self(path, 'rb') try: