HomePhabricator

phabricator: pass old `fctx` to `addoldbinary()` instead of inferring it

Authored by mharbison72.

Description

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