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
Wed, 14 Oct 2020 14:43:39 -0700 record: when backing up, avoid generating very long filenames
Kyle Lippincott <spectral@google.com> [Wed, 14 Oct 2020 14:43:39 -0700] rev 45716
record: when backing up, avoid generating very long filenames If the original file's path is longer than the individual filename maximum length (256 on Linux, I believe?), then this mechanism of "replace slashes with underscores" causes an error. Now, we'll produce just the "basename" of the file, plus some stuff to ensure it's unique. This can be potentially confusing for users if there's a file with the same name in multiple directories, but I suspect that this is better than just breaking. Example: `<reporoot>/a/long/path/to/somefile.txt` used to be backed up as `<reporoot>/.hg/record-backups/a_long_path_to_somefile.txt.abcdefgh`, it will now be backed up as `<reporoot>/.hg/record-backups/somefile.txt.abcdefgh` We could do the naive thing (what we were doing before) and have it to doing something with either subdirectories (`<backuproot>/a/long/path/to/somefile.txt.abcdefgh` or minimize #dirs with `<backuproot>/a_long_path/to_somefile.txt.abcdefgh`), prefix-truncated paths (such as `<backuproot>/__ath_to_somefile.txt.abcdefgh`, where that `__` elides enough to get us under 255 chars (counting the +9 we need to add!)), or hash-of-dirname (`<backuproot>/<sha1sum_of_dirname>/somefile.txt.abcdefgh`), but ultimately every option felt over engineered and that it would be more likely to cause problems than it would be to solve any, especially if it was conditional on directory length. Differential Revision: https://phab.mercurial-scm.org/D9207
Sat, 10 Oct 2020 12:43:04 +0530 mergestate: add `allextras()` to get all extras
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 12:43:04 +0530] rev 45715
mergestate: add `allextras()` to get all extras `extras()` can only be used for getting extra for a file. However at couple of places in code, we wanted to iterate over all the extras stored with the mergestate and they were accessing the private `_stateextras`. We add a new function for this. Differential Revision: https://phab.mercurial-scm.org/D9190
Tue, 06 Oct 2020 19:11:34 +0530 mergestate: document `o` merge record state in _mergestate_base docs
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 06 Oct 2020 19:11:34 +0530] rev 45714
mergestate: document `o` merge record state in _mergestate_base docs _mergestate_base documentation serves as a nice documentation for mergestate. This also documents known merge records and known merge record states. I missed adding `o` state to it when I introduced it. Let's add it now. Differential Revision: https://phab.mercurial-scm.org/D9156
Fri, 09 Oct 2020 00:33:50 -0400 fix: update commit hash references in the new commits
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Oct 2020 00:33:50 -0400] rev 45713
fix: update commit hash references in the new commits Differential Revision: https://phab.mercurial-scm.org/D9183
Fri, 09 Oct 2020 00:14:07 -0400 absorb: update commit hash references in the new commits
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Oct 2020 00:14:07 -0400] rev 45712
absorb: update commit hash references in the new commits Differential Revision: https://phab.mercurial-scm.org/D9182
Thu, 08 Oct 2020 23:33:04 -0400 rewriteutil: handle dropped commits when updating description hashes
Matt Harbison <matt_harbison@yahoo.com> [Thu, 08 Oct 2020 23:33:04 -0400] rev 45711
rewriteutil: handle dropped commits when updating description hashes In looking to leverage this with the absorb extension, the old -> new mapping there allows the new value to be None. We could filter that out and not pass it to this method, but it seems worth a message to the user. (I wonder if these should be an info or warning, because it's unlikely people are using `-v` regularly.) Differential Revision: https://phab.mercurial-scm.org/D9181
Fri, 09 Oct 2020 10:20:53 +0200 dirstate-tree: move a conditional in an explicit boolean
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Oct 2020 10:20:53 +0200] rev 45710
dirstate-tree: move a conditional in an explicit boolean This will help readability a bit and make the next change simpler to read. Differential Revision: https://phab.mercurial-scm.org/D9202
Thu, 08 Oct 2020 18:50:46 +0200 rust: cleanup some white space in a dock
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Oct 2020 18:50:46 +0200] rev 45709
rust: cleanup some white space in a dock They seems to have sneaked there somehow. Differential Revision: https://phab.mercurial-scm.org/D9201
Sat, 10 Oct 2020 13:19:25 +0530 commit: pass ChangingFiles object as argument to _process_files
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 13:19:25 +0530] rev 45708
commit: pass ChangingFiles object as argument to _process_files Instead of returning it, we pass it as an argument. This makes the whole if-else in `_prepare_files` a bit simpler. Else each if-else branch was creating the object. Differential Revision: https://phab.mercurial-scm.org/D9194
Sat, 10 Oct 2020 13:15:20 +0530 commit: pass mergestate into `_process_files` instead of re-reading it
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 13:15:20 +0530] rev 45707
commit: pass mergestate into `_process_files` instead of re-reading it Differential Revision: https://phab.mercurial-scm.org/D9193
Sat, 10 Oct 2020 13:12:11 +0530 commit: move salvaged calculation a bit earlier in the function
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 13:12:11 +0530] rev 45706
commit: move salvaged calculation a bit earlier in the function This helps us initialize mergestate before and now we can pass it into `_process_files()` instead of re-reading it there. Differential Revision: https://phab.mercurial-scm.org/D9192
Sat, 10 Oct 2020 12:53:35 +0530 commit: refactor salvage calculation to a different function
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 12:53:35 +0530] rev 45705
commit: refactor salvage calculation to a different function Differential Revision: https://phab.mercurial-scm.org/D9191
Thu, 08 Oct 2020 09:54:38 -0700 tests: run test-copies-chain-merge.t also with copies in changesets
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 09:54:38 -0700] rev 45704
tests: run test-copies-chain-merge.t also with copies in changesets We have these tests already and it seems like a waste to not run them in the changesets case. The biggest differences stem from `hg log --follow` not working with copies stored in the changeset extras. Differential Revision: https://phab.mercurial-scm.org/D9173
Thu, 08 Oct 2020 08:12:47 -0700 tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 08:12:47 -0700] rev 45703
tests: add test of copies suggested by Pierre-Yves on D9159 Differential Revision: https://phab.mercurial-scm.org/D9171
Thu, 08 Oct 2020 15:09:28 -0700 tests: update test-copies-chain-merge.t to not use empty files
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 15:09:28 -0700] rev 45702
tests: update test-copies-chain-merge.t to not use empty files Merging empty files is not very interesting or realistic. Differential Revision: https://phab.mercurial-scm.org/D9172
Fri, 09 Oct 2020 19:19:10 +0900 revset: fix sorting key of wdir revision
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Oct 2020 19:19:10 +0900] rev 45701
revset: fix sorting key of wdir revision It would go wrong on Python 2, and would crash on Python 3.
Wed, 09 Sep 2020 16:18:26 +0900 grep: move prep() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:18:26 +0900] rev 45700
grep: move prep() to grepsearcher class
Wed, 09 Sep 2020 16:04:39 +0900 grep: move readfile() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:04:39 +0900] rev 45699
grep: move readfile() to grepsearcher class
Wed, 09 Sep 2020 16:00:03 +0900 grep: move getbody() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:00:03 +0900] rev 45698
grep: move getbody() to grepsearcher class
Wed, 09 Sep 2020 15:56:40 +0900 grep: add stub class that maintains cache and states of grep operation
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:56:40 +0900] rev 45697
grep: add stub class that maintains cache and states of grep operation Prepares for extracting stateful functions from commands.grep().
Wed, 09 Sep 2020 15:23:49 +0900 grep: move match and diff logic to new module
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:23:49 +0900] rev 45696
grep: move match and diff logic to new module commands.grep() has lots of functions and classes. Let's split it into reusable components so we can leverage them to implement a revset predicate for 'hg grep --diff'. I want to do 'hg log -r "diff(pattern)"'.
Wed, 09 Sep 2020 15:17:26 +0900 grep: explicitly pass regexp to closure functions
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:17:26 +0900] rev 45695
grep: explicitly pass regexp to closure functions These functions will be extracted to new module.
Thu, 08 Oct 2020 17:29:51 +0530 upgrade: improve documentation of matchrevlog()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 08 Oct 2020 17:29:51 +0530] rev 45694
upgrade: improve documentation of matchrevlog() It was not clear what selected for cloning meant. I updated with an extra line of description.
Fri, 09 Oct 2020 09:46:03 -0700 automation: support running against Python 3.9
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Oct 2020 09:46:03 -0700] rev 45693
automation: support running against Python 3.9 We just added CPython 3.9.0 to the automation environment. Let's support actions targeting it. One side-effect of this change is that we'll produce Windows wheels for Python 3.9 by default. This is desirable. Differential Revision: https://phab.mercurial-scm.org/D9189
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip