Merge pull request #2268 from schmkr/svnDriver-trunkPath-improvements
Improved the handling of trunkPathpull/2800/merge
commit
c96dedd19c
|
@ -196,10 +196,10 @@ class SvnDriver extends VcsDriver
|
||||||
if (null === $this->branches) {
|
if (null === $this->branches) {
|
||||||
$this->branches = array();
|
$this->branches = array();
|
||||||
|
|
||||||
if (false === strpos($this->trunkPath, '/')) {
|
if (false === $this->trunkPath) {
|
||||||
$trunkParent = $this->baseUrl . '/';
|
$trunkParent = $this->baseUrl . '/';
|
||||||
} else {
|
} else {
|
||||||
$trunkParent = $this->baseUrl . '/' . dirname($this->trunkPath) . '/';
|
$trunkParent = $this->baseUrl . '/' . $this->trunkPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = $this->execute('svn ls --verbose', $trunkParent);
|
$output = $this->execute('svn ls --verbose', $trunkParent);
|
||||||
|
@ -207,12 +207,12 @@ class SvnDriver extends VcsDriver
|
||||||
foreach ($this->process->splitLines($output) as $line) {
|
foreach ($this->process->splitLines($output) as $line) {
|
||||||
$line = trim($line);
|
$line = trim($line);
|
||||||
if ($line && preg_match('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
|
if ($line && preg_match('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
|
||||||
if (isset($match[1]) && isset($match[2]) && $match[2] === $this->trunkPath . '/') {
|
if (isset($match[1]) && isset($match[2]) && $match[2] === 'composer.json') {
|
||||||
$this->branches[$this->trunkPath] = $this->buildIdentifier(
|
$this->branches['trunk'] = $this->buildIdentifier(
|
||||||
'/' . $this->trunkPath,
|
'/' . $this->trunkPath,
|
||||||
$match[1]
|
$match[1]
|
||||||
);
|
);
|
||||||
$this->rootIdentifier = $this->branches[$this->trunkPath];
|
$this->rootIdentifier = $this->branches['trunk'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue