use of org.jetbrains.idea.svn.api.Depth in project intellij-community by JetBrains.
the class OneShotMergeInfoHelper method prepare.
@Override
public void prepare() throws VcsException {
Depth depth = Depth.allOrEmpty(myMergeContext.getVcs().getSvnConfiguration().isCheckNestedForQuickMerge());
File file = myMergeContext.getWcInfo().getRootInfo().getIoFile();
myMergeContext.getVcs().getFactory(file).createPropertyClient().getProperty(SvnTarget.fromFile(file), SvnPropertyKeys.MERGE_INFO, SVNRevision.WORKING, depth, createPropertyHandler());
}
use of org.jetbrains.idea.svn.api.Depth in project intellij-community by JetBrains.
the class SvnRecursiveStatusWalker method processRecursively.
private void processRecursively(@NotNull VirtualFile vFile, @NotNull Depth prevDepth) {
if (Depth.EMPTY.equals(prevDepth))
return;
if (isIgnoredIdeaLevel(vFile)) {
myReceiver.processIgnored(vFile);
return;
}
Depth newDepth = Depth.INFINITY.equals(prevDepth) ? Depth.INFINITY : Depth.EMPTY;
VirtualFileVisitor.Option[] options = newDepth.equals(Depth.EMPTY) ? ar(SKIP_ROOT, ONE_LEVEL_DEEP) : new VirtualFileVisitor.Option[0];
visitChildrenRecursively(vFile, new VirtualFileVisitor(options) {
@NotNull
@Override
public Result visitFileEx(@NotNull VirtualFile file) {
if (isIgnoredIdeaLevel(file)) {
myReceiver.processIgnored(file);
return SKIP_CHILDREN;
} else if (file.isDirectory() && file.findChild(SvnUtil.SVN_ADMIN_DIR_NAME) != null) {
myQueue.add(createItem(VcsUtil.getFilePath(file), newDepth, true));
return SKIP_CHILDREN;
} else {
myReceiver.processUnversioned(file);
return CONTINUE;
}
}
});
}
use of org.jetbrains.idea.svn.api.Depth in project intellij-community by JetBrains.
the class SvnCheckinEnvironment method scheduleUnversionedFilesForAddition.
public static List<VcsException> scheduleUnversionedFilesForAddition(@NotNull SvnVcs vcs, List<VirtualFile> files, final boolean recursive) {
Collections.sort(files, FilePathComparator.getInstance());
ProgressTracker eventHandler = new SvnProgressCanceller() {
@Override
public void consume(ProgressEvent event) throws SVNException {
// TODO: indicator is null here when invoking "Add" action
ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
File file = event.getFile();
if (indicator != null && file != null) {
indicator.setText(SvnBundle.message("progress.text2.adding", file.getName() + " (" + file.getParent() + ")"));
}
}
};
List<VcsException> exceptions = new ArrayList<>();
Depth depth = Depth.allOrEmpty(recursive);
for (VirtualFile file : files) {
try {
File convertedFile = VfsUtilCore.virtualToIoFile(file);
vcs.getFactory(convertedFile).createAddClient().add(convertedFile, depth, true, false, true, eventHandler);
} catch (VcsException e) {
exceptions.add(e);
}
}
return exceptions;
}
Aggregations