Page MenuHomePhabricator

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

Authored by mharbison72 on Mar 4 2020, 11:56 AM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Mar 4 2020, 11:56 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.