Wed, 14 Oct 2020 21:47:14 +0200 pycompat: update comment about unnamedtempfile
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Oct 2020 21:47:14 +0200] rev 45726
pycompat: update comment about unnamedtempfile I found the comment clearer. I end up having to think about this for `TemporaryFile` and I update that one in the process. Differential Revision: https://phab.mercurial-scm.org/D9210
Tue, 08 Sep 2020 18:16:24 +0900 revset: add diff(pattern) predicate for "grep --diff"
Yuya Nishihara <yuya@tcha.org> [Tue, 08 Sep 2020 18:16:24 +0900] rev 45725
revset: add diff(pattern) predicate for "grep --diff" I find this is useful in GUI log viewer since the tool only needs to support "log -rREV" command. This is basic implementation. Windowed search is not implemented since it wouldn't work pretty well with the smartset API. And filename matcher is not supported because the syntax isn't determined. My idea is to add handling of diff(pattern, file(..)) and diff(pattern, follow(..)), which will then be evolved to a full revset+matcher combinator support: x & diff(pattern, y & z) ===== y & z builds (revs(y) & revs(z), matcher(y) & matcher(z)) pair, and narrows the search space of diff() ==================== diff() returns matched (revs, matcher) pair ======================== revs and matcher will be combined respectively by &-operator, and the matcher will optionally be used to filter "hg log -p" output The predicate name "diff()" wouldn't be great, but grep() is already used. Another options I can think of are "grepdiff()" and "containsdiff()". Naming suggestions are welcome.
Mon, 05 Oct 2020 20:40:39 +0900 stringutil: add function to compile stringmatcher pattern into regexp
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Oct 2020 20:40:39 +0900] rev 45724
stringutil: add function to compile stringmatcher pattern into regexp Prepares for adding a revset predicate for "grep --diff". The grep logic needs a regexp object instead of a match function.
Wed, 14 Oct 2020 22:10:48 +0900 py3: fix stringmatcher() to byte-stringify exception message
Yuya Nishihara <yuya@tcha.org> [Wed, 14 Oct 2020 22:10:48 +0900] rev 45723
py3: fix stringmatcher() to byte-stringify exception message Spotted while writing regexp variant of stringmatcher().
Mon, 05 Oct 2020 20:53:34 +0900 stringutil: extract helper function that splits stringmatcher() pattern
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Oct 2020 20:53:34 +0900] rev 45722
stringutil: extract helper function that splits stringmatcher() pattern
Wed, 09 Sep 2020 17:17:38 +0900 grep: extract main search loop as searcher method
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 17:17:38 +0900] rev 45721
grep: extract main search loop as searcher method Still displayer part is in commands.grep(), the core grep logic is now reusable. I'll revisit the displayer stuff later since it will be another long series.
Sun, 04 Oct 2020 13:17:57 +0900 scmutil: move walkchangerevs() from cmdutil
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Oct 2020 13:17:57 +0900] rev 45720
scmutil: move walkchangerevs() from cmdutil It's no longer a command-level function, but a pure helper to walk revisions in a windowed way. This change will help eliminate reverse dependency of revset.py -> grep.py -> cmdutil.py in future patches.
Wed, 09 Sep 2020 17:04:44 +0900 grep: extract public function to register file to be skipped
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 17:04:44 +0900] rev 45719
grep: extract public function to register file to be skipped The main grep loop will be extracted to a searcher method, but this skipping condition depends on the result of display() function.
Tue, 13 Oct 2020 16:44:57 -0400 posix: avoid a leaked file descriptor in a unix domain socket exception case
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Oct 2020 16:44:57 -0400] rev 45718
posix: avoid a leaked file descriptor in a unix domain socket exception case Differential Revision: https://phab.mercurial-scm.org/D9206
Tue, 13 Oct 2020 16:41:01 -0400 posix: use context managers in a couple of places
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Oct 2020 16:41:01 -0400] rev 45717
posix: use context managers in a couple of places Differential Revision: https://phab.mercurial-scm.org/D9205
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip