mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
svn: Restore working copy format statistics collecting
1e5c313405 follow-up
FUS-108
This commit is contained in:
@@ -142,6 +142,9 @@
|
||||
<configurable id="vcs.Subversion.SSH" displayName="SSH" instance="org.jetbrains.idea.svn.SvnConfigurable$Ssh"/>
|
||||
</projectConfigurable>
|
||||
<vcsPopupProvider implementation="org.jetbrains.idea.svn.actions.SvnQuickListContentProvider"/>
|
||||
|
||||
<statistics.projectUsagesCollector implementation="org.jetbrains.idea.svn.statistics.SvnWorkingCopyFormatUsagesCollector"/>
|
||||
|
||||
<changesViewContent tabName="Subversion Working Copies Information" className="org.jetbrains.idea.svn.WorkingCopiesContent"
|
||||
predicateClassName="org.jetbrains.idea.svn.WorkingCopiesContent$VisibilityPredicate"/>
|
||||
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.jetbrains.idea.svn.statistics
|
||||
|
||||
import com.intellij.internal.statistic.beans.UsageDescriptor
|
||||
import com.intellij.internal.statistic.service.fus.collectors.ProjectUsagesCollector
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.idea.svn.NestedCopyType
|
||||
import org.jetbrains.idea.svn.SvnVcs
|
||||
|
||||
class SvnWorkingCopyFormatUsagesCollector : ProjectUsagesCollector() {
|
||||
override fun getGroupId() = "statistics.vcs.svn.format"
|
||||
|
||||
override fun getUsages(project: Project): Set<UsageDescriptor> {
|
||||
val vcs = SvnVcs.getInstance(project)
|
||||
|
||||
// do not track roots with errors (SvnFileUrlMapping.getErrorRoots()) as they are "not usable" until errors are resolved
|
||||
// skip externals and switched directories as they will have the same format
|
||||
val roots = vcs.svnFileUrlMapping.allWcInfos.filter { it.type == null || it.type == NestedCopyType.inner }
|
||||
|
||||
return roots.groupingBy { it.format }.eachCount().map { UsageDescriptor(it.key.toString(), it.value) }.toSet()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user