Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15421628
D8478.id24477.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8478.id24477.diff
View Options
Index: src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
===================================================================
--- src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
+++ src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
@@ -121,8 +121,10 @@
}
$futures = array(
- 'old' => $this->buildSVNContentFuture($old),
- 'new' => $this->buildSVNContentFuture($new),
+ 'old_content' => $this->buildSVNContentFuture($old),
+ 'new_content' => $this->buildSVNContentFuture($new),
+ 'old_properties' => $this->buildSVNPropertiesFuture($old),
+ 'new_properties' => $this->buildSVNPropertiesFuture($new),
);
$futures = array_filter($futures);
@@ -138,8 +140,8 @@
$futures[$key] = $stdout;
}
- $old_data = idx($futures, 'old', '');
- $new_data = idx($futures, 'new', '');
+ $old_data = idx($futures, 'old_content', '');
+ $new_data = idx($futures, 'new_content', '');
$engine = new PhabricatorDifferenceEngine();
$engine->setOldName($old_name);
@@ -156,6 +158,22 @@
$change = $changes[$path->getPath()];
+ $prop_parser = $this->getDefaultParser();
+ if (!empty($futures['old_properties'])) {
+ $old_properties = $prop_parser->parseDiff($futures['old_properties']);
+ $old_properties = reset(array_values($old_properties));
+ foreach ($old_properties->getNewProperties() as $key => $value) {
+ $change->setOldProperty($key, $value);
+ }
+ }
+ if (!empty($futures['new_properties'])) {
+ $new_properties = $prop_parser->parseDiff($futures['new_properties']);
+ $new_properties = reset(array_values($new_properties));
+ foreach ($new_properties->getNewProperties() as $key => $value) {
+ $change->setNewProperty($key, $value);
+ }
+ }
+
return array($change);
}
@@ -192,6 +210,21 @@
$repository->getSubversionPathURI($ref, $rev));
}
+ private function buildSVNPropertiesFuture($spec) {
+ if (!$spec) {
+ return null;
+ }
+
+ $drequest = $this->getDiffusionRequest();
+ $repository = $drequest->getRepository();
+
+ list($ref, $rev) = $spec;
+ return $repository->getRemoteCommandFuture(
+ 'diff -r 0:%s --depth empty %s',
+ $rev,
+ $repository->getSubversionPathURI($ref, $rev));
+ }
+
private function getGitOrMercurialResult(ConduitAPIRequest $request) {
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 23, 1:25 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7714523
Default Alt Text
D8478.id24477.diff (2 KB)
Attached To
Mode
D8478: Fetch SVN property changes for Diffusion
Attached
Detach File
Event Timeline
Log In to Comment