Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15412863
D10840.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10840.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10840: Fix parent commit detection for SVN repositories with sub-path
Attached
Detach File
Event Timeline
Log In to Comment