Fri, 19 May 2017 13:16:15 -0700 match: remove special-casing of always-matching patterns in patternmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 13:16:15 -0700] rev 32590
match: remove special-casing of always-matching patterns in patternmatcher This moves the optimization for patterns that match everything to the caller, so we can remove it from patternmatcher. Note that we need to teach alwaysmatcher to use relative paths now in cases like "hg files .." from inside mercurial/, because while it still matches everything, paths should be printed relative to the working directory.
Fri, 19 May 2017 12:47:45 -0700 match: move normalize() call out of matcher constructors
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 12:47:45 -0700] rev 32589
match: move normalize() call out of matcher constructors By passing in the result of the normalize() call, we prepare for moving the special handling of patterns that always match out of the patternmatcher. It also lets us remove many of the arguments from the matcher, because they were passed only the the normalize function (we could have removed the arguments by binding them to the function instead of moving the normalize() call out).
Fri, 19 May 2017 11:58:16 -0700 match: drop support for empty pattern list in patternmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 11:58:16 -0700] rev 32588
match: drop support for empty pattern list in patternmatcher Since the caller now deals with empty pattern lists, we can drop that support in the patternmatcher. It now gets the more logical behavior of matching nothing when no patterns are given (although there is no in-core caller that will pass no patterns).
Sat, 20 May 2017 23:49:14 -0700 match: optimize visitdir() for when no explicit files are listed
Martin von Zweigbergk <martinvonz@google.com> [Sat, 20 May 2017 23:49:14 -0700] rev 32587
match: optimize visitdir() for when no explicit files are listed In patternmatcher, we used to say that all directories should be visited if no explicit files were listed, because the case of empty _files usually implied that no patterns were given (which in turns meant that everything should match). However, this made e.g. "hg files -r . rootfilesin:." slower than necessary, because that also ended up with an empty list in _files. Now that patternmatcher does not handle includes, the only remaining case where its _files/_fileset fields will be empty is when it's matching everything. We can therefore treat the always-case specially and stop treating the empty _files case specially. This makes the case mentioned above faster on treemanifest repos.
Fri, 19 May 2017 11:50:01 -0700 match: handle everything-matching using new alwaysmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 11:50:01 -0700] rev 32586
match: handle everything-matching using new alwaysmatcher Having a special matcher that always matches seems to make more sense than making one of the other matchers handle the case. For now, we just use this new matcher when no patterns were provided.
Fri, 26 May 2017 13:08:30 -0700 match: add __repr__ for subdirmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 26 May 2017 13:08:30 -0700] rev 32585
match: add __repr__ for subdirmatcher Should at least be useful for debugging. Would matter for correctness too if fsmonitor or Facebook's sparse extension worked with subrepos (which I don't know if they do).
Sun, 28 May 2017 21:31:29 -0400 tests: make test-manifest.py portable to Python 3
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 21:31:29 -0400] rev 32584
tests: make test-manifest.py portable to Python 3 Lots of b prefixes here, and https://bugs.python.org/issue29714 means that this test is still very broken on Python 3.6 and 3.6.1, but 3.6.2 should things (based on testing using tip of the 3.6 branch from git). #cleanup-only
Mon, 29 May 2017 00:00:02 -0400 cleanup: rename all iteritems methods to items and add iteritems alias
Augie Fackler <raf@durin42.com> [Mon, 29 May 2017 00:00:02 -0400] rev 32583
cleanup: rename all iteritems methods to items and add iteritems alias Due to a quirk of our module importer setup on Python 3, all calls and definitions of methods named iteritems() get rewritten at import time. Unfortunately, this means there's not a good portable way to access these methods from non-module-loader'ed code like our unit tests. This change fixes that, which also unblocks test-manifest.py from passing under Python 3. We don't presently define any itervalues methods, or we'd need to give those similar treatment.
Sun, 28 May 2017 15:51:07 -0400 help: work around textwrap.dedent() only working on strings
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:51:07 -0400] rev 32582
help: work around textwrap.dedent() only working on strings
Sun, 28 May 2017 15:43:06 -0400 server: write out pid using bytes IO instead of str IO
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:43:06 -0400] rev 32581
server: write out pid using bytes IO instead of str IO
Sun, 28 May 2017 13:28:41 -0400 help: convert dict to strkwargs
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 13:28:41 -0400] rev 32580
help: convert dict to strkwargs
Sun, 28 May 2017 13:42:16 -0400 util: use sysstr.join instead of bytes.join in textwrap wrapper
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 13:42:16 -0400] rev 32579
util: use sysstr.join instead of bytes.join in textwrap wrapper
Sun, 28 May 2017 15:42:05 -0400 tests: port test extension in test-help.t to python 3
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:42:05 -0400] rev 32578
tests: port test extension in test-help.t to python 3 The changes required herein suggest to me that we should probably accept ascii-safe unicode strings for command name, flag name, etc.
Sun, 28 May 2017 15:51:26 -0400 doc: port check-seclevel.py to be Python 2/3 portable
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:51:26 -0400] rev 32577
doc: port check-seclevel.py to be Python 2/3 portable
Sun, 28 May 2017 23:54:31 +0900 match: define exactmatcher.matchfn statically
Yuya Nishihara <yuya@tcha.org> [Sun, 28 May 2017 23:54:31 +0900] rev 32576
match: define exactmatcher.matchfn statically This should eliminate the reference cycle, self.matchfn -> self.exact -> self.
Sun, 28 May 2017 23:51:30 +0900 match: remove override of prefix() from differencematcher
Yuya Nishihara <yuya@tcha.org> [Sun, 28 May 2017 23:51:30 +0900] rev 32575
match: remove override of prefix() from differencematcher It's exactly the same as basematcher.prefix().
Sat, 27 May 2017 18:52:46 +0900 cat: do not start pager if output will be written to file
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 18:52:46 +0900] rev 32574
cat: do not start pager if output will be written to file
Sat, 27 May 2017 18:50:05 +0900 cat: pass filename template as explicit argument
Yuya Nishihara <yuya@tcha.org> [Sat, 27 May 2017 18:50:05 +0900] rev 32573
cat: pass filename template as explicit argument I'll move the handling of the '-' filename to commands.cat().
Thu, 25 May 2017 21:28:08 +0900 cmdutil: extract function checking if pattern should be taken as stdin/out
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 21:28:08 +0900] rev 32572
cmdutil: extract function checking if pattern should be taken as stdin/out This will be used in commands.cat().
Thu, 25 May 2017 21:25:49 +0900 cmdutil: drop deprecated hack to pass file object to makefileobj() (API)
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 21:25:49 +0900] rev 32571
cmdutil: drop deprecated hack to pass file object to makefileobj() (API) All callers pass a string 'pat' or None.
Mon, 29 May 2017 21:57:51 +0900 encoding: make sure "wide" variable never be referenced from other modules
Yuya Nishihara <yuya@tcha.org> [Mon, 29 May 2017 21:57:51 +0900] rev 32570
encoding: make sure "wide" variable never be referenced from other modules Better to not expose (maybe-) unicode objects.
Sun, 28 May 2017 21:29:58 -0400 manifest: use itertools.chain() instead of + for Python 3 compat
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 21:29:58 -0400] rev 32569
manifest: use itertools.chain() instead of + for Python 3 compat This is all pure-Python code, so I'm not too worried about perf here, but we can come back and fix it should it be a problem. With this change, the manifest code passes most unit tests on Python 3 (once the tests are corrected with many b prefixes. I've got a little more to sort out there and then I'll mail that change too.
Sun, 28 May 2017 21:29:15 -0400 manifest: fix some pure-Python parser bits to work on Python 3
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 21:29:15 -0400] rev 32568
manifest: fix some pure-Python parser bits to work on Python 3
Sun, 28 May 2017 18:08:36 -0400 tests: make test-manifest finish importing in Python 3
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 18:08:36 -0400] rev 32567
tests: make test-manifest finish importing in Python 3 The test is still broken, but now it executes.
Sun, 28 May 2017 18:08:14 -0400 tests: drop assertIn polyfill now that we're 2.7-only
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 18:08:14 -0400] rev 32566
tests: drop assertIn polyfill now that we're 2.7-only
Sun, 28 May 2017 11:13:10 -0700 perf: benchmark command for revlog indexes
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 28 May 2017 11:13:10 -0700] rev 32565
perf: benchmark command for revlog indexes We didn't have explicit microbenchmark coverage for loading revlog indexes. That seems like a useful thing to have, so let's add it. We currently measure the low-level nodemap APIs. There is room to hook in at the actual revlog layer. This could be done as a follow-up. The hackiest thing about this patch is specifying revlog paths. Other commands have arguments that allow resolution of changelog, manifest, and filelog. I needed to hook in at a lower level of the revlog API than what the existing helper functions to resolve revlogs allowed. I was too lazy to write some new APIs. This could be done as a follow-up easily enough. Example output for `hg perfrevlogindex 00changelog.i` on my Firefox repo (404418 revisions): ! revlog constructor ! wall 0.003106 comb 0.000000 user 0.000000 sys 0.000000 (best of 912) ! read ! wall 0.003077 comb 0.000000 user 0.000000 sys 0.000000 (best of 924) ! create index object ! wall 0.000000 comb 0.000000 user 0.000000 sys 0.000000 (best of 1803994) ! retrieve index entry for rev 0 ! wall 0.000193 comb 0.000000 user 0.000000 sys 0.000000 (best of 14037) ! look up missing node ! wall 0.003313 comb 0.000000 user 0.000000 sys 0.000000 (best of 865) ! look up node at rev 0 ! wall 0.003295 comb 0.010000 user 0.010000 sys 0.000000 (best of 858) ! look up node at 1/4 len ! wall 0.002598 comb 0.010000 user 0.010000 sys 0.000000 (best of 1103) ! look up node at 1/2 len ! wall 0.001909 comb 0.000000 user 0.000000 sys 0.000000 (best of 1507) ! look up node at 3/4 len ! wall 0.001213 comb 0.000000 user 0.000000 sys 0.000000 (best of 2275) ! look up node at tip ! wall 0.000453 comb 0.000000 user 0.000000 sys 0.000000 (best of 5697) ! look up all nodes (forward) ! wall 0.094615 comb 0.100000 user 0.100000 sys 0.000000 (best of 100) ! look up all nodes (reverse) ! wall 0.045889 comb 0.050000 user 0.050000 sys 0.000000 (best of 100) ! retrieve all index entries (forward) ! wall 0.078398 comb 0.080000 user 0.060000 sys 0.020000 (best of 100) ! retrieve all index entries (reverse) ! wall 0.079376 comb 0.080000 user 0.070000 sys 0.010000 (best of 100)
Sun, 28 May 2017 10:56:28 -0700 perf: rename perfrevlog to perfrevlogrevisions
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 28 May 2017 10:56:28 -0700] rev 32564
perf: rename perfrevlog to perfrevlogrevisions We have a couple of commands beginning with "perfrevlog." The actual "perfrevlog" command actually measures resolving the fulltext of multiple revisions. So let's rename it to reflect what it actually does.
Sun, 28 May 2017 15:43:26 -0400 server: use pycompat to get argv
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:43:26 -0400] rev 32563
server: use pycompat to get argv
Sun, 28 May 2017 13:27:29 -0400 encoding: make wide character class list a sysstr
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 13:27:29 -0400] rev 32562
encoding: make wide character class list a sysstr That's what east_asian_width returns, so just match it.
Sun, 28 May 2017 14:02:14 -0400 cmdutil: use sorted(dict) instead of x = dict.keys(); x.sort()
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 14:02:14 -0400] rev 32561
cmdutil: use sorted(dict) instead of x = dict.keys(); x.sort() The former both does less work and has the virtue of working on Python 3.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip