Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14110386
D10865.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10865.diff
View Options
diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php
--- a/src/applications/differential/parser/DifferentialChangesetParser.php
+++ b/src/applications/differential/parser/DifferentialChangesetParser.php
@@ -90,6 +90,7 @@
const ATTR_DELETED = 'attr:deleted';
const ATTR_UNCHANGED = 'attr:unchanged';
const ATTR_WHITELINES = 'attr:white';
+ const ATTR_MOVEAWAY = 'attr:moveaway';
const LINES_CONTEXT = 8;
@@ -438,6 +439,10 @@
return idx($this->specialAttributes, self::ATTR_WHITELINES, false);
}
+ public function isMoveAway() {
+ return idx($this->specialAttributes, self::ATTR_MOVEAWAY, false);
+ }
+
private function applyIntraline(&$render, $intra, $corpus) {
foreach ($render as $key => $text) {
@@ -594,6 +599,7 @@
}
}
+ $moveaway = false;
$changetype = $this->changeset->getChangeType();
if ($changetype == DifferentialChangeType::TYPE_MOVE_AWAY) {
// sometimes we show moved files as unchanged, sometimes deleted,
@@ -601,12 +607,14 @@
// 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;
+ $moveaway = true;
}
$this->setSpecialAttributes(array(
self::ATTR_UNCHANGED => $unchanged,
self::ATTR_DELETED => $hunk_parser->getIsDeleted(),
self::ATTR_WHITELINES => !$hunk_parser->getHasTextChanges(),
+ self::ATTR_MOVEAWAY => $moveaway,
));
$hunk_parser->generateIntraLineDiffs();
@@ -775,6 +783,8 @@
$shield = $renderer->renderShield(
pht('The contents of this file were not changed.'),
$type);
+ } else if ($this->isMoveAway()) {
+ $shield = null;
} else if ($this->isWhitespaceOnly()) {
$shield = $renderer->renderShield(
pht('This file was changed only by adding or removing whitespace.'),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 5:13 PM (21 h, 44 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6801514
Default Alt Text
D10865.diff (1 KB)
Attached To
Mode
D10865: Differential - stop showing the shield for "move away" operations
Attached
Detach File
Event Timeline
Log In to Comment