diff options
Diffstat (limited to 'plugins/svn4idea/src/org/jetbrains/idea/svn/add/CmdAddClient.java')
-rw-r--r-- | plugins/svn4idea/src/org/jetbrains/idea/svn/add/CmdAddClient.java | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/add/CmdAddClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/add/CmdAddClient.java index 4811e3286d70..6894800427c2 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/add/CmdAddClient.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/add/CmdAddClient.java @@ -4,15 +4,12 @@ import com.intellij.openapi.vcs.VcsException; import com.intellij.util.containers.Convertor; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.idea.svn.api.BaseSvnClient; -import org.jetbrains.idea.svn.api.FileStatusResultParser; +import org.jetbrains.idea.svn.api.*; import org.jetbrains.idea.svn.commandLine.CommandExecutor; import org.jetbrains.idea.svn.commandLine.CommandUtil; import org.jetbrains.idea.svn.commandLine.SvnCommandName; -import org.tmatesoft.svn.core.SVNDepth; -import org.tmatesoft.svn.core.wc.ISVNEventHandler; -import org.tmatesoft.svn.core.wc.SVNEvent; -import org.tmatesoft.svn.core.wc.SVNStatusType; +import org.jetbrains.idea.svn.api.Depth; +import org.jetbrains.idea.svn.status.StatusType; import org.tmatesoft.svn.core.wc2.SvnTarget; import java.io.File; @@ -33,11 +30,11 @@ public class CmdAddClient extends BaseSvnClient implements AddClient { @Override public void add(@NotNull File file, - @Nullable SVNDepth depth, + @Nullable Depth depth, boolean makeParents, boolean includeIgnored, boolean force, - @Nullable ISVNEventHandler handler) throws VcsException { + @Nullable ProgressTracker handler) throws VcsException { List<String> parameters = prepareParameters(file, depth, makeParents, includeIgnored, force); // TODO: handler should be called in parallel with command execution, but this will be in other thread @@ -48,7 +45,7 @@ public class CmdAddClient extends BaseSvnClient implements AddClient { parser.parse(command.getOutput()); } - private static List<String> prepareParameters(File file, SVNDepth depth, boolean makeParents, boolean includeIgnored, boolean force) { + private static List<String> prepareParameters(File file, Depth depth, boolean makeParents, boolean includeIgnored, boolean force) { List<String> parameters = new ArrayList<String>(); CommandUtil.put(parameters, file); @@ -60,14 +57,13 @@ public class CmdAddClient extends BaseSvnClient implements AddClient { return parameters; } - private static class AddStatusConvertor implements Convertor<Matcher, SVNEvent> { + private static class AddStatusConvertor implements Convertor<Matcher, ProgressEvent> { @Override - public SVNEvent convert(Matcher o) { - SVNStatusType contentStatus = CommandUtil.getStatusType(o.group(1)); + public ProgressEvent convert(Matcher o) { + StatusType contentStatus = CommandUtil.getStatusType(o.group(1)); String path = o.group(3); - return new SVNEvent(new File(path), null, null, 0, contentStatus, null, null, null, null, null, null, null, - null, null, null); + return new ProgressEvent(new File(path), 0, contentStatus, null, null, null, null); } } } |