Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13970087
D8019.id18138.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8019.id18138.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
@@ -952,6 +952,110 @@
));
}
+ public function testSubversionPartialParser() {
+ $repository = $this->buildBareRepository('CHD');
+ $repository->setDetail('svn-subpath', 'trunk/');
+
+ id(new PhabricatorRepositoryPullEngine())
+ ->setRepository($repository)
+ ->pullRepository();
+
+ id(new PhabricatorRepositoryDiscoveryEngine())
+ ->setRepository($repository)
+ ->discoverCommits($repository);
+
+ $viewer = PhabricatorUser::getOmnipotentUser();
+
+ $commits = id(new DiffusionCommitQuery())
+ ->setViewer($viewer)
+ ->withRepositoryIDs(array($repository->getID()))
+ ->execute();
+
+ $this->expectChanges(
+ $repository,
+ $commits,
+ array(
+ // Copy of a file outside of the subpath from an earlier revision
+ // into the subpath.
+ 4 => array(
+ array(
+ '/',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 4,
+ ),
+ array(
+ '/goat',
+ null,
+ null,
+ DifferentialChangeType::TYPE_COPY_AWAY,
+ DifferentialChangeType::FILE_NORMAL,
+ 0,
+ 4,
+ ),
+ array(
+ '/trunk',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 4,
+ ),
+ array(
+ '/trunk/goat',
+ '/goat',
+ '1',
+ DifferentialChangeType::TYPE_COPY_HERE,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 4,
+ ),
+ ),
+ 3 => array(
+ array(
+ '/',
+ null,
+ null,
+ DifferentialChangeType::TYPE_CHILD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 0,
+ 3,
+ ),
+ array(
+ '/trunk',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_DIRECTORY,
+ 1,
+ 3,
+ ),
+ array(
+ '/trunk/apple',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 3,
+ ),
+ array(
+ '/trunk/banana',
+ null,
+ null,
+ DifferentialChangeType::TYPE_ADD,
+ DifferentialChangeType::FILE_NORMAL,
+ 1,
+ 3,
+ ),
+ ),
+ ));
+ }
+
private function expectChanges(
PhabricatorRepository $repository,
array $commits,
@@ -1023,7 +1127,10 @@
ksort($dicts);
ksort($expect_changes);
- $this->assertEqual($expect_changes, $dicts);
+ $this->assertEqual(
+ $expect_changes,
+ $dicts,
+ pht('Commit %s', $commit_identifier));
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 18 2024, 5:40 AM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6718332
Default Alt Text
D8019.id18138.diff (3 KB)
Attached To
Mode
D8019: Add yet more unit tests for Subversion
Attached
Detach File
Event Timeline
Log In to Comment