Search in sources :

Example 6 with BaseUpdateCommandListener

use of org.jetbrains.idea.svn.commandLine.BaseUpdateCommandListener in project intellij-community by JetBrains.

the class CmdDeleteClient method delete.

@Override
public void delete(@NotNull File path, boolean force, boolean dryRun, @Nullable ProgressTracker handler) throws VcsException {
    // TODO: probably add some widespread checks for dryRun delete - but most likely this should be placed upper - in merge logic
    if (!dryRun) {
        List<String> parameters = new ArrayList<>();
        CommandUtil.put(parameters, path);
        CommandUtil.put(parameters, force, "--force");
        File workingDirectory = CommandUtil.getHomeDirectory();
        BaseUpdateCommandListener listener = new BaseUpdateCommandListener(workingDirectory, handler);
        execute(myVcs, SvnTarget.fromFile(path), workingDirectory, SvnCommandName.delete, parameters, listener);
        listener.throwWrappedIfException();
    }
}
Also used : BaseUpdateCommandListener(org.jetbrains.idea.svn.commandLine.BaseUpdateCommandListener) ArrayList(java.util.ArrayList) File(java.io.File)

Example 7 with BaseUpdateCommandListener

use of org.jetbrains.idea.svn.commandLine.BaseUpdateCommandListener in project intellij-community by JetBrains.

the class CmdMergeClient method run.

private void run(File destination, ProgressTracker handler, List<String> parameters) throws VcsException {
    BaseUpdateCommandListener listener = new BaseUpdateCommandListener(CommandUtil.requireExistingParent(destination), handler);
    execute(myVcs, SvnTarget.fromFile(destination), SvnCommandName.merge, parameters, listener);
    listener.throwWrappedIfException();
}
Also used : BaseUpdateCommandListener(org.jetbrains.idea.svn.commandLine.BaseUpdateCommandListener)

Aggregations

BaseUpdateCommandListener (org.jetbrains.idea.svn.commandLine.BaseUpdateCommandListener)7 File (java.io.File)4 ArrayList (java.util.ArrayList)3 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 NotNull (org.jetbrains.annotations.NotNull)1 ProgressEvent (org.jetbrains.idea.svn.api.ProgressEvent)1