use of com.intellij.openapi.vcs.update.FileGroup in project intellij-community by JetBrains.
the class UpdateEventHandler method setRevisionForWaitingFiles.
private void setRevisionForWaitingFiles(long revisionNumber) {
SvnRevisionNumber revision = new SvnRevisionNumber(SVNRevision.create(revisionNumber));
for (Pair<String, String> pair : myFilesWaitingForRevision.pop()) {
FileGroup fileGroup = myUpdatedFiles.getGroupById(pair.getFirst());
fileGroup.add(pair.getSecond(), SvnVcs.getKey(), revision);
}
}
use of com.intellij.openapi.vcs.update.FileGroup in project intellij-community by JetBrains.
the class ResolveWorker method needsInteraction.
public boolean needsInteraction(final UpdatedFiles updatedFiles) {
if (myChangesUnderProjectRoot) {
refreshChangeListsFindConflicts(updatedFiles);
} else {
final FileGroup conflictedGroup = updatedFiles.getGroupById(FileGroup.MERGED_WITH_CONFLICT_ID);
for (String filename : conflictedGroup.getFiles()) {
final VirtualFile vf = SvnUtil.getVirtualFile(filename);
myConflictedVirtualFiles.add(vf);
}
}
return ((!myConflictedVirtualFiles.isEmpty()) || (!haveUnresolvedConflicts(updatedFiles))) && (!SvnConfiguration.getInstance(myProject).isMergeDryRun());
}
use of com.intellij.openapi.vcs.update.FileGroup in project intellij-community by JetBrains.
the class ResolveWorker method execute.
// on EDT, dispose checked
public void execute(final UpdatedFiles updatedFiles) {
if (myConflictedVirtualFiles.isEmpty()) {
return;
}
final AbstractVcsHelper vcsHelper = AbstractVcsHelper.getInstance(myProject);
List<VirtualFile> mergedFiles = vcsHelper.showMergeDialog(myConflictedVirtualFiles, new SvnMergeProvider(myProject));
final FileGroup mergedGroup = updatedFiles.getGroupById(FileGroup.MERGED_ID);
final FileGroup conflictedGroup = updatedFiles.getGroupById(FileGroup.MERGED_WITH_CONFLICT_ID);
final VcsKey vcsKey = SvnVcs.getKey();
for (final VirtualFile mergedFile : mergedFiles) {
String path = FileUtil.toSystemDependentName(mergedFile.getPresentableUrl());
conflictedGroup.remove(path);
mergedGroup.add(path, vcsKey, null);
mergedFile.refresh(false, false);
// for additionally created files removal to be detected
mergedFile.getParent().refresh(false, false);
if (myChangesUnderProjectRoot) {
myDirtyScopeManager.fileDirty(mergedFile);
}
}
}
use of com.intellij.openapi.vcs.update.FileGroup in project intellij-community by JetBrains.
the class UpdatedFilesProcessor method addFileMessage.
public void addFileMessage(FileMessage message) {
String path = message.getFileAbsolutePath();
VirtualFile virtualFile = getVirtualFileFor(path);
final int messageType = message.getType();
if (virtualFile != null && messageType == FileMessage.NOT_IN_REPOSITORY && FileTypeManager.getInstance().isFileIgnored(virtualFile)) {
return;
}
FileGroup collection = getCollectionFor(messageType, virtualFile);
LOG.assertTrue(collection != null, String.valueOf(messageType));
final CvsRevisionNumber revision = message.getRevision();
collection.add(path, CvsVcs2.getKey(), revision);
}
use of com.intellij.openapi.vcs.update.FileGroup in project intellij-community by JetBrains.
the class CvsUpdatePolicy method fillGroups.
public static void fillGroups(UpdatedFiles result) {
result.registerGroup(new FileGroup(CvsBundle.message("update.status.unknown"), CvsBundle.message("update.status.unknown"), false, CvsUpdatePolicy.UNKNOWN_TYPE_ID, false));
result.registerGroup(new FileGroup(CvsBundle.message("update.status.locally.modified.removed.from.server"), CvsBundle.message("update.status.locally.modified.removed.from.server"), false, CvsUpdatePolicy.MODIFIED_REMOVED_FROM_SERVER_ID, false));
result.registerGroup(new FileGroup(CvsBundle.message("update.status.locally.removed.modified.on.server"), CvsBundle.message("update.status.locally.removed.modified.on.server"), false, CvsUpdatePolicy.LOCALLY_REMOVED_MODIFIED_ON_SERVER_ID, false));
result.registerGroup(new FileGroup(CvsBundle.message("update.status.created.by.second.party"), CvsBundle.message("update.status.created.by.second.party"), true, CvsUpdatePolicy.CREATED_BY_SECOND_PARTY_ID, false));
result.registerGroup(new FileGroup(CvsBundle.message("update.status.binary.file.has.to.be.merged"), CvsBundle.message("update.status.binary.file.has.to.be.merged"), false, CvsUpdatePolicy.BINARY_MERGED_ID, false));
}
Aggregations