Sat, 11 Apr 2015 23:00:04 +0900 vfs: add walk
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24725
vfs: add walk To eliminate "path prefix" (= "the root of vfs") part from "dirpath" yielded by "os.walk()" correctly, "path prefix" should have "os.sep" at the end of own string, but it isn't easy to ensure it, because: - examination by "path.endswith(os.sep)" isn't portable Some problematic encodings use 0x5c (= "os.sep" on Windows) as the tail byte of some multi-byte characters. - "os.path.join(path, '')" isn't portable With Python 2.7.9, this invocation doesn't add "os.sep" at the end of UNC path (see issue4557 for detail). Python 2.7.9 changed also behavior of "os.path.normpath()" (see *) and "os.path.splitdrive()" for UNC path. vfs root normpath splitdrive os.sep required =============== ============== =================== ============ z:\ z:\ z: + \ no z:\foo z:\foo z: + \foo yes z:\foo\ z:\foo z: + \foo yes [before Python 2.7.9] \\foo\bar \\foo\bar '' + \\foo\bar yes \\foo\bar\ \\foo\bar (*) '' + \\foo\bar yes \\foo\bar\baz \\foo\bar\baz '' + \\foo\bar\baz yes \\foo\bar\baz\ \\foo\bar\baz '' + \\foo\bar\baz yes [Python 2.7.9] \\foo\bar \\foo\bar \\foo\bar + '' yes \\foo\bar\ \\foo\bar\ (*) \\foo\bar + \ no \\foo\bar\baz \\foo\bar\baz \\foo\bar + \baz yes \\foo\bar\baz\ \\foo\bar\baz \\foo\bar + \baz yes If it is ensured that "normpath()"-ed vfs root is passed to "splitdrive()", adding "os.sep" is required only when "path" part of "splitdrive()" result isn't "os.sep" itself. This is just what "pathutil.nameasprefix()" examines. This patch applies "os.path.normpath()" on "self.join(None)" explicitly, because it isn't ensured that vfs root is already normalized: vfs itself is constructed with "realpath=False" (= avoid normalizing in "vfs.__init__()") in many code paths. This normalization should be much cheaper than subsequent file I/O for directory traversal.
Sat, 11 Apr 2015 23:00:04 +0900 subrepo: pass wvfs to _sanitize instead of absolute path to a subrepository
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24724
subrepo: pass wvfs to _sanitize instead of absolute path to a subrepository As a preparation for vfs migration of "_sanitize()", this patch passes "wvfs" to "_sanitize()" and use "wvfs.base" instead of absolute path to a subrepository.
Wed, 01 Apr 2015 18:43:29 -0700 repoview: move function for computing filtered hash
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Apr 2015 18:43:29 -0700] rev 24723
repoview: move function for computing filtered hash An upcoming patch will establish per-filter tags caches. We'll want to use the same cache validation logic as the branch cache. Prepare for that by moving the logic for computing a filtered view hash to somewhere central.
Tue, 14 Apr 2015 12:54:16 -0400 revset: don't import discovery at module level
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Apr 2015 12:54:16 -0400] rev 24722
revset: don't import discovery at module level discovery.py imports a lot of the world. Pierre-Yves told me to move it to a function-level import to avoid an import cycle in a future patch.
Tue, 14 Apr 2015 10:59:26 -0400 transaction: add missing newline to message
Michael O'Connor <moconnor@janestreet.com> [Tue, 14 Apr 2015 10:59:26 -0400] rev 24721
transaction: add missing newline to message Add a missing newline to the "journal was created by a different version of Mercurial" message.
Sun, 05 Apr 2015 13:16:46 +0900 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org> [Sun, 05 Apr 2015 13:16:46 +0900] rev 24720
cat: disable optimization of single file case for workingctx It crashes because workingctx has no manifest.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip