use of org.jetbrains.idea.svn.commandLine.Command in project intellij-community by JetBrains.
the class CmdRevertClient method revert.
@Override
public void revert(@NotNull Collection<File> paths, @Nullable Depth depth, @Nullable ProgressTracker handler) throws VcsException {
if (!ContainerUtil.isEmpty(paths)) {
Command command = newCommand(SvnCommandName.revert);
command.put(depth);
command.setTargets(paths);
// TODO: handler should be called in parallel with command execution, but this will be in other thread
// TODO: check if that is ok for current handler implementation
// TODO: add possibility to invoke "handler.checkCancelled" - process should be killed
SvnTarget target = SvnTarget.fromFile(ObjectUtils.assertNotNull(ContainerUtil.getFirstItem(paths)));
CommandExecutor executor = execute(myVcs, target, CommandUtil.getHomeDirectory(), command, null);
FileStatusResultParser parser = new FileStatusResultParser(CHANGED_PATH, handler, new RevertStatusConvertor());
parser.parse(executor.getOutput());
}
}
Aggregations