mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] inline VcsLogStorageBackend#getRename function
GitOrigin-RevId: 5ec95ad28757b495a529da80e98f96e7cb14eb0f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
08d8bab3be
commit
f428648590
+1
-3
@@ -258,11 +258,9 @@ internal class PhmVcsLogStorageBackend(
|
||||
return this.users.getCommitsForUsers(users)
|
||||
}
|
||||
|
||||
override fun getRename(parent: Int, child: Int): IntArray? = renames.get(intArrayOf(parent, child))
|
||||
|
||||
@Throws(IOException::class)
|
||||
override fun findRename(parent: Int, child: Int, root: VirtualFile, path: FilePath, isChildPath: Boolean): EdgeData<FilePath?>? {
|
||||
val renames = getRename(parent, child)
|
||||
val renames = renames.get(intArrayOf(parent, child))
|
||||
if (renames == null || renames.isEmpty()) {
|
||||
return null
|
||||
}
|
||||
|
||||
+4
-8
@@ -306,13 +306,6 @@ internal class SqliteVcsLogStorageBackend(project: Project,
|
||||
}
|
||||
}
|
||||
|
||||
override fun getRename(parent: Int, child: Int): IntArray {
|
||||
return connectionManager.selectRename.use { statement, binder ->
|
||||
binder.bind(parent, child)
|
||||
readIntArray(statement)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getCommitsForSubstring(string: String,
|
||||
candidates: IntSet?,
|
||||
noTrigramSources: MutableList<String>,
|
||||
@@ -461,7 +454,10 @@ internal class SqliteVcsLogStorageBackend(project: Project,
|
||||
}
|
||||
|
||||
override fun findRename(parent: Int, child: Int, root: VirtualFile, path: FilePath, isChildPath: Boolean): EdgeData<FilePath?>? {
|
||||
val renames = getRename(parent, child)
|
||||
val renames = connectionManager.selectRename.use { statement, binder ->
|
||||
binder.bind(parent, child)
|
||||
readIntArray(statement)
|
||||
}
|
||||
if (renames.isEmpty()) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -42,8 +42,6 @@ internal interface VcsLogStorageBackend : VcsLogUsersStorage, VcsLogPathsStorage
|
||||
@Throws(IOException::class)
|
||||
fun processMessages(processor: (Int, String) -> Boolean)
|
||||
|
||||
fun getRename(parent: Int, child: Int): IntArray?
|
||||
|
||||
fun createWriter(): VcsLogWriter
|
||||
|
||||
fun getCommitsForSubstring(string: String,
|
||||
|
||||
Reference in New Issue
Block a user