mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg]: allow to switch off hg ignored files processing
* IDEA-174155 - add registry key to avoid hg status --ignored command for a large number of files;
This commit is contained in:
@@ -883,7 +883,7 @@ git.diff.renameLimit.infinity.description=Sets diff.renameLimit configuration va
|
||||
If option is set to false, diff.renameLimit is taken from Git configuration (it is usually not zero by default).\
|
||||
Switching this option off may prevent Git from detecting renames in large commits in the file history.
|
||||
|
||||
hg4idea.process.ignored=false
|
||||
hg4idea.process.ignored=true
|
||||
hg4idea.process.ignored.description=Process and highlight mercurial ignored files. \
|
||||
Switching on this option may lead to some performance problems.
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.zmlx.hg4idea.provider;
|
||||
import com.intellij.dvcs.repo.AsyncFilesManagerListener;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
@@ -59,22 +60,24 @@ public class HgLocalIgnoredHolder implements Disposable {
|
||||
}
|
||||
|
||||
public void startRescan() {
|
||||
myUpdateQueue.queue(new Update("hgRescanIgnored") {
|
||||
@Override
|
||||
public boolean canEat(Update update) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (myInUpdateMode.compareAndSet(false, true)) {
|
||||
fireUpdateStarted();
|
||||
rescanAllIgnored();
|
||||
myInUpdateMode.set(false);
|
||||
fireUpdateFinished();
|
||||
if (Registry.is("hg4idea.process.ignored")) {
|
||||
myUpdateQueue.queue(new Update("hgRescanIgnored") {
|
||||
@Override
|
||||
public boolean canEat(Update update) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (myInUpdateMode.compareAndSet(false, true)) {
|
||||
fireUpdateStarted();
|
||||
rescanAllIgnored();
|
||||
myInUpdateMode.set(false);
|
||||
fireUpdateFinished();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void fireUpdateStarted() {
|
||||
|
||||
Reference in New Issue
Block a user