tests/test-revlog-ancestry.py.out
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 09 Oct 2012 01:41:55 +0900
changeset 17727 6492b39a44d5
parent 16868 eb88ed4269c5
child 18081 f88c60e740a1
permissions -rw-r--r--
store: replace invocation of "getsize()" by "vfs.stat()" This patch replaces invocation of "getsize()", which calls "os.stat()" internally, by "vfs.stat()". The object referred by "self.rawvfs" is used internally by "_fncachevfs" and doesn't encode filename for each file API invocation. This patch invokes "os.stat()" via "self.rawvfs" to avoid redundant filename encoding: invocation of "os.stat()" via "self.vfs" hides filename encoding and encoding result from caller, so it is not appropriate, when both encoded and non-encoded filenames should be yield. Even though changeset b42b0729744d improved stream_out performance by "self.pathsep + path", this patch replaces it by "os.path.join(self.base, path)" of vfs. So, this may increase cost to join path components. But this shouldn't have large impact, because: - such cost is much less than cost of "os.stat()" which causes system call invocation - "datafiles()" of store object is invoked only for "hg manifest --all" or "hg verify" which are both heavy functions

Ancestors of 5
4 2 0 
Ancestors of 6 and 5
3 4 2 1 0 
Ancestors of 5 and 4
4 2 0 
Ancestors of 7, stop at 6
6 

Descendants of 5
7 8 
Descendants of 5 and 3
6 7 8 
Descendants of 5 and 4
5 7 8