mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg]: remove IGNORED processor
This commit is contained in:
@@ -102,7 +102,7 @@ public class HgVFSListener extends VcsVFSListener {
|
||||
try {
|
||||
untrackedFiles
|
||||
.addAll(new HgStatusCommand.Builder(false).unknown(true).removed(true).build(myProject)
|
||||
.getHgUntrackedFiles(repo, new ArrayList<>(files)));
|
||||
.getFiles(repo, new ArrayList<>(files)));
|
||||
}
|
||||
catch (final VcsException ex) {
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
|
||||
@@ -238,13 +238,12 @@ public class HgStatusCommand {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Collection<VirtualFile> getHgUntrackedFiles(@NotNull VirtualFile repo, @NotNull List<VirtualFile> files) throws VcsException {
|
||||
Collection<VirtualFile> untrackedFiles = new HashSet<>();
|
||||
List<FilePath> filePaths = ObjectsConvertor.vf2fp(files);
|
||||
Set<HgChange> change = executeInCurrentThread(repo, filePaths);
|
||||
public Collection<VirtualFile> getFiles(@NotNull VirtualFile repo, @Nullable List<VirtualFile> files) throws VcsException {
|
||||
Collection<VirtualFile> resultFiles = new HashSet<>();
|
||||
Set<HgChange> change = executeInCurrentThread(repo, files != null ? ObjectsConvertor.vf2fp(files) : null);
|
||||
for (HgChange hgChange : change) {
|
||||
untrackedFiles.add(hgChange.afterFile().toFilePath().getVirtualFile());
|
||||
resultFiles.add(hgChange.afterFile().toFilePath().getVirtualFile());
|
||||
}
|
||||
return untrackedFiles;
|
||||
return resultFiles;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ package org.zmlx.hg4idea.provider;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.vcs.*;
|
||||
import com.intellij.openapi.vcs.changes.*;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
@@ -51,7 +50,6 @@ public class HgChangeProvider implements ChangeProvider {
|
||||
static {
|
||||
PROCESSORS.put(HgFileStatusEnum.ADDED, HgChangeProcessor.ADDED);
|
||||
PROCESSORS.put(HgFileStatusEnum.DELETED, HgChangeProcessor.DELETED);
|
||||
PROCESSORS.put(HgFileStatusEnum.IGNORED, HgChangeProcessor.IGNORED);
|
||||
PROCESSORS.put(HgFileStatusEnum.MISSING, HgChangeProcessor.MISSING);
|
||||
PROCESSORS.put(HgFileStatusEnum.COPY, HgChangeProcessor.COPIED);
|
||||
PROCESSORS.put(HgFileStatusEnum.MODIFIED, HgChangeProcessor.MODIFIED);
|
||||
@@ -89,8 +87,7 @@ public class HgChangeProvider implements ChangeProvider {
|
||||
final HgRevisionNumber parentRevision = new HgWorkingCopyRevisionsCommand(myProject).firstParent(repo);
|
||||
final Map<HgFile, HgResolveStatusEnum> list = new HgResolveCommand(myProject).getListSynchronously(repo);
|
||||
|
||||
hgChanges.addAll(new HgStatusCommand.Builder(true).ignored(Registry.is("hg4idea.process.ignored")).build(myProject)
|
||||
.executeInCurrentThread(repo, entry.getValue()));
|
||||
hgChanges.addAll(new HgStatusCommand.Builder(true).ignored(false).build(myProject).executeInCurrentThread(repo, entry.getValue()));
|
||||
final HgRepository hgRepo = HgUtil.getRepositoryForFile(myProject, repo);
|
||||
if (hgRepo != null && hgRepo.hasSubrepos()) {
|
||||
hgChanges.addAll(ContainerUtil.mapNotNull(hgRepo.getSubrepos(), info -> findChange(hgRepo, info)));
|
||||
@@ -217,15 +214,6 @@ public class HgChangeProvider implements ChangeProvider {
|
||||
}
|
||||
},
|
||||
|
||||
IGNORED() {
|
||||
@Override
|
||||
void process(Project project, VcsKey vcsKey, ChangelistBuilder builder,
|
||||
HgRevisionNumber currentNumber, HgRevisionNumber parentRevision,
|
||||
HgFile beforeFile, HgFile afterFile) {
|
||||
builder.processIgnoredFile(VcsUtil.getVirtualFile(afterFile.getFile()));
|
||||
}
|
||||
},
|
||||
|
||||
MISSING() {
|
||||
@Override
|
||||
void process(Project project, VcsKey vcsKey, ChangelistBuilder builder,
|
||||
|
||||
Reference in New Issue
Block a user