Thu, 20 Feb 2020 10:46:43 -0500 phabricator: don't infer the old `fctx` in `notutf8()`
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 Feb 2020 10:46:43 -0500] rev 44426
phabricator: don't infer the old `fctx` in `notutf8()` This is used along with `fctx.isbinary()` to gate `addoldbinary()`, so it seems like a good idea to provide the caller similar control over the current and parent filecontext. Unlike `addoldbinary()`, it doesn't need both previous and current contexts at the same time, so make the caller responsible for testing both cases, as appropriate. I haven't worked out all of the problems around marking files as binary for move/remove/copy, but this will definitely help with `--no-stack` too. It also turns out to have been doing too much- in the remove case, it tested not just the removed file in the parent context (which is what gets passed in that case), but also in the parent of the parent context (which should be irrelevant). The previous code also required the `fctx.parents()` check to work in the add (but without rename) case. Now the add and remove cases test only what they need to. But now that it is written this way, the fact that only the current `fctx` is checked to be binary in the case of modification or being renamed seems wrong. Differential Revision: https://phab.mercurial-scm.org/D8220
Thu, 20 Feb 2020 12:42:07 -0500 phabricator: rename a variable to clarify that it is the parent filecontext
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 Feb 2020 12:42:07 -0500] rev 44425
phabricator: rename a variable to clarify that it is the parent filecontext Differential Revision: https://phab.mercurial-scm.org/D8219
Wed, 19 Feb 2020 13:33:58 -0500 phabricator: pass old `fctx` to `addoldbinary()` instead of inferring it
Matt Harbison <matt_harbison@yahoo.com> [Wed, 19 Feb 2020 13:33:58 -0500] rev 44424
phabricator: pass old `fctx` to `addoldbinary()` instead of inferring it Currently, removed binaries aren't marked as binaries on the left side, which sends the raw file view to a bad URL in the web interface. (See D8009) In order to handle marking the file as binary in the removed case, both contexts need to be provided by the caller, since there is no current fctx in the removed case. Having an explicit old fctx will also be useful to support a `--no-stack` option that rolls up the commit stack into a single review. The bug isn't fixed with this change- there's a missing call to it in `addremoved()` as well. But instead of spamming the list with a bunch of test diffs, all of the missing binary issues will be fixed at once later. Differential Revision: https://phab.mercurial-scm.org/D8218
Wed, 04 Mar 2020 10:25:07 -0500 phabricator: make `hg phabread` work outside of a repository
Matt Harbison <matt_harbison@yahoo.com> [Wed, 04 Mar 2020 10:25:07 -0500] rev 44423
phabricator: make `hg phabread` work outside of a repository This is similar to 16312ea45a8b and 2513f0f70a26- we don't need a repo, but will load .hg/hgrc if inside one. Differential Revision: https://phab.mercurial-scm.org/D8214
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -4 +4 +10 +30 +100 +300 +1000 +3000 tip