1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

avoid claiming that the source of a file move was unchanged

Summary:
sometimes we show moved files as unchanged, sometimes deleted,
and sometimes inconsistent with what actually happened at the
destination of the move.  Rather than make a false claim,
omit the 'not changed' notice if this is the source of a move.

Background: one of our users was confused by the source of a move
claiming to be unmodified when the destination of the move had
extensive modifications.

There may be a question about the quality of the data we keep/compute
about the changes, so maybe we could do a better or more consistent
job there (may just be nuances of the SCM in use); this approach
just smoothes that out and doesn't require fixing up the status
in pre-existing diffs.

Test Plan:
In the facebook phabricator, D594195#739ace1a and D590020#b97cfcfd
For others, find a diff that has moved files.
For the source of a move, we should now only show the "X moved to Y"
header and not the "unchanged" shield.

Reviewers: nh, vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3669
This commit is contained in:
Wez Furlong 2012-10-09 14:16:21 -07:00
parent 4b4e140f7b
commit 1b6eced757

View file

@ -446,6 +446,14 @@ final class DifferentialChangesetParser {
$unchanged = true;
}
}
$changetype = $this->changeset->getChangeType();
if ($changetype == DifferentialChangeType::TYPE_MOVE_AWAY) {
// sometimes we show moved files as unchanged, sometimes deleted,
// and sometimes inconsistent with what actually happened at the
// destination of the move. Rather than make a false claim,
// omit the 'not changed' notice if this is the source of a move
$unchanged = false;
}
$this->specialAttributes = array(
self::ATTR_UNCHANGED => $unchanged,