diff options
Diffstat (limited to 'plugins/svn4idea/src/org/jetbrains/idea/svn/revert/CmdRevertClient.java')
-rw-r--r-- | plugins/svn4idea/src/org/jetbrains/idea/svn/revert/CmdRevertClient.java | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/revert/CmdRevertClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/revert/CmdRevertClient.java index aef5ae942687..a57e24b525d7 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/revert/CmdRevertClient.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/revert/CmdRevertClient.java @@ -4,15 +4,11 @@ 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.SVNEventAction; +import org.jetbrains.idea.svn.api.Depth; import org.tmatesoft.svn.core.wc2.SvnTarget; import java.io.File; @@ -32,7 +28,7 @@ public class CmdRevertClient extends BaseSvnClient implements RevertClient { private static final Pattern CHANGED_PATH = Pattern.compile(STATUS + PATH + OPTIONAL_COMMENT); @Override - public void revert(@NotNull File[] paths, @Nullable SVNDepth depth, @Nullable ISVNEventHandler handler) throws VcsException { + public void revert(@NotNull File[] paths, @Nullable Depth depth, @Nullable ProgressTracker handler) throws VcsException { if (paths.length > 0) { List<String> parameters = prepareParameters(paths, depth); @@ -46,7 +42,7 @@ public class CmdRevertClient extends BaseSvnClient implements RevertClient { } } - private static List<String> prepareParameters(File[] paths, SVNDepth depth) { + private static List<String> prepareParameters(File[] paths, Depth depth) { ArrayList<String> parameters = new ArrayList<String>(); CommandUtil.put(parameters, paths); @@ -55,9 +51,9 @@ public class CmdRevertClient extends BaseSvnClient implements RevertClient { return parameters; } - private static class RevertStatusConvertor implements Convertor<Matcher, SVNEvent> { + private static class RevertStatusConvertor implements Convertor<Matcher, ProgressEvent> { - public SVNEvent convert(@NotNull Matcher matcher) { + public ProgressEvent convert(@NotNull Matcher matcher) { String statusMessage = matcher.group(1); String path = matcher.group(2); @@ -65,17 +61,17 @@ public class CmdRevertClient extends BaseSvnClient implements RevertClient { } @Nullable - public static SVNEventAction createAction(@NotNull String code) { - SVNEventAction result = null; + public static EventAction createAction(@NotNull String code) { + EventAction result = null; if ("Reverted".equals(code)) { - result = SVNEventAction.REVERT; + result = EventAction.REVERT; } else if ("Failed to revert".equals(code)) { - result = SVNEventAction.FAILED_REVERT; + result = EventAction.FAILED_REVERT; } else if ("Skipped".equals(code)) { - result = SVNEventAction.SKIP; + result = EventAction.SKIP; } return result; |