* finish task #6953.

This commit is contained in:
wangyidong
2020-03-04 15:07:49 +08:00
parent 94f8bf2dfc
commit b9d709ccc4
11 changed files with 144 additions and 108 deletions
+14 -3
View File
@@ -96,12 +96,23 @@ class Subversion
public function tags($path, $revision = 'HEAD', $onlyDir = true)
{
$infos = $this->ls($path, $revision);
$tags = array();
$dirs = array();
foreach($infos as $info)
{
if($onlyDir and $info->kind != 'dir') continue;
$dirPath = $path . '/' . $info->name;
$tags[$dirPath] = $info->name;
$dirs[$info->date][$info->name] = $info->name;
}
ksort($dirs);
$tags = array();
foreach($dirs as $dirNames)
{
ksort($dirNames);
foreach($dirNames as $dirName)
{
$dirPath = $path . '/' . $dirName;
$tags[$dirPath] = $dirName;
}
}
return $tags;