Page MenuHomePhabricator

D10840.diff
No OneTemporary

D10840.diff

diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelParentsQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelParentsQuery.php
--- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelParentsQuery.php
+++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelParentsQuery.php
@@ -72,13 +72,28 @@
private function loadSubversionParents() {
$n = (int)$this->identifier;
- if ($n > 1) {
- $ids = array($n - 1);
- } else {
- $ids = array();
+
+ if ($n <= 1) {
+ return array();
}
- return $ids;
+ $ids = array($n - 1);
+ $repository = $this->getRepository();
+
+ // For fully imported repositories "$n - 1" assumption is always correct.
+ $subpath = $repository->getDetail('svn-subpath');
+ if (!strlen($subpath)) {
+ return $ids;
+ }
+
+ list($xml) = $repository->execxRemoteCommand(
+ 'log %s --xml --revision %d:1 --limit 1',
+ $repository->getSubversionBaseURI(),
+ head($ids));
+
+ $log = new SimpleXMLElement($xml);
+
+ return array((int)$log->logentry['revision']);
}
}

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 3:24 PM (1 d, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7629481
Default Alt Text
D10840.diff (1 KB)

Event Timeline