Pick higher revision number to guarantee successful file retrieval (#11350)
parent
1a3f98601f
commit
3b16937bae
|
@ -236,19 +236,24 @@ class SvnDriver extends VcsDriver
|
||||||
if ($this->tagsPath !== false) {
|
if ($this->tagsPath !== false) {
|
||||||
$output = $this->execute('svn ls --verbose', $this->baseUrl . '/' . $this->tagsPath);
|
$output = $this->execute('svn ls --verbose', $this->baseUrl . '/' . $this->tagsPath);
|
||||||
if ($output) {
|
if ($output) {
|
||||||
|
$lastRev = null;
|
||||||
foreach ($this->process->splitLines($output) as $line) {
|
foreach ($this->process->splitLines($output) as $line) {
|
||||||
$line = trim($line);
|
$line = trim($line);
|
||||||
if ($line && Preg::isMatch('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
|
if ($line && Preg::isMatch('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
|
||||||
if (isset($match[1], $match[2]) && $match[2] !== './') {
|
if (isset($match[1], $match[2])) {
|
||||||
|
if ($match[2] === './') {
|
||||||
|
$lastRev = $match[1];
|
||||||
|
} else {
|
||||||
$tags[rtrim($match[2], '/')] = $this->buildIdentifier(
|
$tags[rtrim($match[2], '/')] = $this->buildIdentifier(
|
||||||
'/' . $this->tagsPath . '/' . $match[2],
|
'/' . $this->tagsPath . '/' . $match[2],
|
||||||
$match[1]
|
max($lastRev, $match[1])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->tags = $tags;
|
$this->tags = $tags;
|
||||||
}
|
}
|
||||||
|
@ -291,19 +296,24 @@ class SvnDriver extends VcsDriver
|
||||||
if ($this->branchesPath !== false) {
|
if ($this->branchesPath !== false) {
|
||||||
$output = $this->execute('svn ls --verbose', $this->baseUrl . '/' . $this->branchesPath);
|
$output = $this->execute('svn ls --verbose', $this->baseUrl . '/' . $this->branchesPath);
|
||||||
if ($output) {
|
if ($output) {
|
||||||
|
$lastRev = null;
|
||||||
foreach ($this->process->splitLines(trim($output)) as $line) {
|
foreach ($this->process->splitLines(trim($output)) as $line) {
|
||||||
$line = trim($line);
|
$line = trim($line);
|
||||||
if ($line && Preg::isMatch('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
|
if ($line && Preg::isMatch('{^\s*(\S+).*?(\S+)\s*$}', $line, $match)) {
|
||||||
if (isset($match[1], $match[2]) && $match[2] !== './') {
|
if (isset($match[1], $match[2])) {
|
||||||
|
if ($match[2] === './') {
|
||||||
|
$lastRev = $match[1];
|
||||||
|
} else {
|
||||||
$branches[rtrim($match[2], '/')] = $this->buildIdentifier(
|
$branches[rtrim($match[2], '/')] = $this->buildIdentifier(
|
||||||
'/' . $this->branchesPath . '/' . $match[2],
|
'/' . $this->branchesPath . '/' . $match[2],
|
||||||
$match[1]
|
max($lastRev, $match[1])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->branches = $branches;
|
$this->branches = $branches;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue