Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13995399
D8017.id18158.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D8017.id18158.diff
View Options
Index: src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
===================================================================
--- src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
+++ src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
@@ -406,6 +406,280 @@
$repository,
$commits,
array(
+ // Copy a directory, removing and adding files to the copy
+ '12' => array(
+ array(
+ '/',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 12,
+ ),
+ array(
+ '/dir',
+ null,
+ null,
+ // TODO: This might reasonbly be considered a bug in the parser; it
+ // should probably be COPY_AWAY.
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 12,
+ ),
+ array(
+ '/dir/a',
+ null,
+ null,
+ DifferentialChangeType::TYPE_COPY_AWAY,
+ DifferentialChangeType::FILE_NORMAL,
+ 0,
+ 12,
+ ),
+ array(
+ '/dir/b',
+ null,
+ null,
+ DifferentialChangeType::TYPE_COPY_AWAY,
+ DifferentialChangeType::FILE_NORMAL,
+ 0,
+ 12,
+ ),
+ array(
+ '/dir/subdir',
+ null,
+ null,
+ DifferentialChangeType::TYPE_COPY_AWAY,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 12,
+ ),
+ array(
+ '/dir/subdir/a',
+ null,
+ null,
+ DifferentialChangeType::TYPE_COPY_AWAY,
+ DifferentialChangeType::FILE_NORMAL,
+ 0,
+ 12,
+ ),
+ array(
+ '/dir/subdir/b',
+ null,
+ null,
+ DifferentialChangeType::TYPE_COPY_AWAY,
+ DifferentialChangeType::FILE_NORMAL,
+ 0,
+ 12,
+ ),
+ array(
+ '/dir_copy',
+ '/dir',
+ '11',
+ DifferentialChangeType::TYPE_COPY_HERE,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 1,
+ 12,
+ ),
+ array(
+ '/dir_copy/a',
+ '/dir/a',
+ '11',
+ DifferentialChangeType::TYPE_COPY_HERE,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 12,
+ ),
+ array(
+ '/dir_copy/b',
+ '/dir/b',
+ '11',
+ DifferentialChangeType::TYPE_COPY_HERE,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 12,
+ ),
+ array(
+ '/dir_copy/subdir',
+ '/dir/subdir',
+ '11',
+ DifferentialChangeType::TYPE_COPY_HERE,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 1,
+ 12,
+ ),
+ array(
+ '/dir_copy/subdir/a',
+ '/dir/subdir/a',
+ '11',
+ DifferentialChangeType::TYPE_COPY_HERE,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 12,
+ ),
+ array(
+ '/dir_copy/subdir/b',
+ '/dir/subdir/b',
+ '11',
+ DifferentialChangeType::TYPE_DELETE,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 12,
+ ),
+ array(
+ '/dir_copy/subdir/c',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 12,
+ ),
+ ),
+
+ // Add a directory with a subdirectory and files, sets up next commit
+ '11' => array(
+ array(
+ '/',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 11,
+ ),
+ array(
+ '/dir',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 1,
+ 11,
+ ),
+ array(
+ '/dir/a',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 11,
+ ),
+ array(
+ '/dir/b',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 11,
+ ),
+ array(
+ '/dir/subdir',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 1,
+ 11,
+ ),
+ array(
+ '/dir/subdir/a',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 11,
+ ),
+ array(
+ '/dir/subdir/b',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 11,
+ ),
+ ),
+
+ // Remove directory
+ '10' => array(
+ array(
+ '/',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 10,
+ ),
+ array(
+ '/dir',
+ null,
+ null,
+ DifferentialChangeType::TYPE_DELETE,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 1,
+ 10,
+ ),
+ array(
+ '/dir/subfile',
+ null,
+ null,
+ DifferentialChangeType::TYPE_DELETE,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 10,
+ ),
+ ),
+
+ // Replace directory with file
+ '9' => array(
+ array(
+ '/',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 9,
+ ),
+ array(
+ '/file_moved',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHANGE,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 1,
+ 9,
+ ),
+ ),
+
+ // Replace file with file
+ '8' => array(
+ array(
+ '/',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 8,
+ ),
+ array(
+ '/file_moved',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHANGE,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 8,
+ ),
+ ),
+
'7' => array(
array(
'/',
Index: src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php
===================================================================
--- src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php
+++ src/applications/repository/worker/commitchangeparser/PhabricatorRepositorySvnCommitChangeParserWorker.php
@@ -37,7 +37,7 @@
// TODO: Explicitly mark this commit as broken elsewhere? This isn't
// supposed to happen but we have some cases like rE27 and rG935 in the
// Facebook repositories where things got all clowned up.
- return;
+ return array();
}
$raw_paths = array();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 24, 12:34 PM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718296
Default Alt Text
D8017.id18158.diff (8 KB)
Attached To
Mode
D8017: Add more Subversion unit tests
Attached
Detach File
Event Timeline
Log In to Comment