Sun, 27 Dec 2015 17:45:05 +0900 templatefilters: add "utf8" to get utf-8 bytes from local-encoding text
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Dec 2015 17:45:05 +0900] rev 28209
templatefilters: add "utf8" to get utf-8 bytes from local-encoding text This will be applied prior to "|json" filter. This sounds like odd, but it is necessary to handle local-encoding text as well as raw filename bytes. Because filenames are bytes in Mercurial and Unix world, {filename|json} should preserve the original byte sequence, which implies {x|json} -> '"' toutf8b(x) '"' On the other hand, most template strings are in local encoding. Because "|json" filter have to be byte-transparent to filenames, we need something to annotate an input as a local string, that's what "|utf8" will do. {x|utf8|json} -> '"' toutf8b(fromlocal(x)) '"' "|utf8" is an explicit call, so aborts if input bytes can't be converted to UTF-8.
Sun, 27 Dec 2015 17:16:45 +0900 templatefilters: drop broken "jsonescape" from filters table (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Dec 2015 17:16:45 +0900] rev 28208
templatefilters: drop broken "jsonescape" from filters table (BC) It's been unused, undocumented and flawed in that it expects a unicode input, never works correctly if an input has non-ascii character. We should use "json" filter instead.
Sat, 20 Feb 2016 23:57:21 -0800 treemanifest: rewrite text() using iterentries()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 20 Feb 2016 23:57:21 -0800] rev 28207
treemanifest: rewrite text() using iterentries() This simplifies a bit. Note that the function is only used when manually testing with _treeinmem=True.
Sun, 07 Feb 2016 21:14:01 -0800 treemanifest: implement iterentries()
Martin von Zweigbergk <martinvonz@google.com> [Sun, 07 Feb 2016 21:14:01 -0800] rev 28206
treemanifest: implement iterentries() To make tests pass with _treeinmem manually set to True, we need to implement the recently added iterentries() on the treemanifest class too.
Thu, 11 Feb 2016 15:38:56 -0800 verify: show progress while verifying dirlogs
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Feb 2016 15:38:56 -0800] rev 28205
verify: show progress while verifying dirlogs In repos with treemanifests, the non-root-directory dirlogs often have many more total revisions than the root manifest log has. This change adds progress out to that part of 'hg verify'. Since the verification is recursive along the directory tree, we don't know how many total revisions there are at the beginning of the command, so instead we report progress in units of directories, much like we report progress for verification of files today. I'm not very happy with passing both 'storefiles' and 'progress' into the recursive calls. I tried passing in just a 'visitdir(dir)' callback, but the results did not seem better overall. I'm happy to update if anyone has better ideas.
Wed, 03 Feb 2016 15:35:15 -0800 verify: check for orphaned dirlogs
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Feb 2016 15:35:15 -0800] rev 28204
verify: check for orphaned dirlogs We already report orphaned filelogs, i.e. revlogs for files that are not mentioned in any manifest. This change adds checking for orphaned dirlogs, i.e. revlogs that are not mentioned in any parent-directory dirlog. Note that, for fncachestore, only files mentioned in the fncache are considered, there's not check for files in .hg/store/meta that are not mentioned in the fncache. This is no different from the current situation for filelogs.
Sun, 07 Feb 2016 21:13:24 -0800 verify: check directory manifests
Martin von Zweigbergk <martinvonz@google.com> [Sun, 07 Feb 2016 21:13:24 -0800] rev 28203
verify: check directory manifests In repos with treemanifests, there is no specific verification of directory manifest revlogs. It simply collects all file nodes by reading each manifest delta. With treemanifests, that's means calling the manifest._slowreaddelta(). If there are missing revlog entries in a subdirectory revlog, 'hg verify' will simply report the exception that occurred while trying to read the root manifest: manifest@0: reading delta 1700e2e92882: meta/b/00manifest.i@67688a370455: no node This patch changes the verify code to load only the root manifest at first and verify all revisions of it, then verify all revisions of each direct subdirectory, and so on, recursively. The above message becomes b/@0: parent-directory manifest refers to unknown revision 67688a370455 Since the new algorithm reads a single revlog at a time and in order, 'hg verify' on a treemanifest version of the hg core repo goes from ~50s to ~14s. As expected, there is no significant difference on a repo with flat manifests.
Sat, 20 Feb 2016 17:44:29 -0800 hg: perform update after pulling during clone with share (issue5103)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 20 Feb 2016 17:44:29 -0800] rev 28202
hg: perform update after pulling during clone with share (issue5103) When pooled storage is enabled, `hg clone` will initialize a repo from a local repo using the store sharing mechanism then pull from the originally requested repo. Before this patch, the working directory update occurred between these steps. This meant that we would only update to revisions that were already present in the local pooled storage. This patch moves the update to after we pull from the originally requested repository so we may check out a revision that didn't yet exist locally. In other words, it makes the behavior like normal `hg clone`.
Sat, 20 Feb 2016 17:41:59 -0800 hg: extract post share update logic into own function
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 20 Feb 2016 17:41:59 -0800] rev 28201
hg: extract post share update logic into own function A future patch will introduce a new caller that needs to perform an update. Extract the code so we don't duplicate it.
Sat, 20 Feb 2016 15:54:09 -0800 merge: perform background file closing in batchget
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 20 Feb 2016 15:54:09 -0800] rev 28200
merge: perform background file closing in batchget As 2fdbf22a1b63 demonstrated with stream clones, closing files on background threads on Windows can yield a significant speedup because closing files that have been created/appended to is slow on Windows/NTFS. Working directory updates can write thousands of files. Therefore it is susceptible to excessive slowness on Windows due to slow file closes. This patch enables background file closing when performing working directory file writes. The impact when performing an `hg up tip` on mozilla-central (136,357 files) from an empty working directory is significant: Before: 535s (8:55) After: 133s (2:13) Delta: -402s (6:42) That's a 4x speedup! By comparison, that same machine can perform the same operation in ~15s on Linux. So Windows went from ~35x to ~9x slower. Not bad but there's still work to do. As a reminder, background file closing is only activated on Windows because it is only beneficial on that platform. So this patch shouldn't change non-Windows behavior at all. It's worth noting that non-Windows systems perform working directory updates with multiple processes. Unfortunately, worker.py doesn't yet support Windows. So, there is still plenty of room for making working directory updates faster on Windows. Even if multiple processes are used on Windows, I believe background file closing will still provide a benefit, as individual processes will still be slowed down by the file close bottleneck (assuming the I/O system isn't saturated).
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip