mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Allow 'arc' to parse copies or added files
Summary: See task. This is a bizarre edge case which we incorrectly reject but should do our best with. Test Plan: Created an added copy of a file and diffed it successfully. Reviewed By: alex Reviewers: alex, jungejason, tuomaspelkonen, aran CC: aran, alex Differential Revision: 547
This commit is contained in:
parent
cc283a63a5
commit
ffeeeb8c55
1 changed files with 5 additions and 0 deletions
|
@ -151,6 +151,10 @@ class ArcanistDiffParser {
|
|||
switch ($type) {
|
||||
case ArcanistDiffChangeType::TYPE_MULTICOPY:
|
||||
case ArcanistDiffChangeType::TYPE_COPY_AWAY:
|
||||
// "Add" is possible if you do some bizarre tricks with svn:ignore and
|
||||
// "svn copy"'ing URLs straight from the repository; you can end up with
|
||||
// a file that is a copy of itself. See T271.
|
||||
case ArcanistDiffChangeType::TYPE_ADD:
|
||||
break;
|
||||
case ArcanistDiffChangeType::TYPE_DELETE:
|
||||
$origin->setType(ArcanistDiffChangeType::TYPE_MOVE_AWAY);
|
||||
|
@ -171,6 +175,7 @@ class ArcanistDiffParser {
|
|||
case ArcanistDiffChangeType::TYPE_MOVE_AWAY:
|
||||
$change->setType(ArcanistDiffChangeType::TYPE_MOVE_HERE);
|
||||
break;
|
||||
case ArcanistDiffChangeType::TYPE_ADD:
|
||||
case ArcanistDiffChangeType::TYPE_COPY_AWAY:
|
||||
$change->setType(ArcanistDiffChangeType::TYPE_COPY_HERE);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue