diff options
Diffstat (limited to 'plugins/svn4idea/src/org/jetbrains/idea/svn/properties')
3 files changed, 22 insertions, 20 deletions
diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/CmdPropertyClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/CmdPropertyClient.java index 60ab43c3baba..e855abe1ec2e 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/CmdPropertyClient.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/CmdPropertyClient.java @@ -5,12 +5,13 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.idea.svn.SvnUtil; import org.jetbrains.idea.svn.api.BaseSvnClient; +import org.jetbrains.idea.svn.api.Depth; import org.jetbrains.idea.svn.commandLine.CommandExecutor; import org.jetbrains.idea.svn.commandLine.CommandUtil; import org.jetbrains.idea.svn.commandLine.SvnCommandName; +import org.jetbrains.idea.svn.info.Info; import org.tmatesoft.svn.core.*; import org.tmatesoft.svn.core.wc.ISVNPropertyHandler; -import org.tmatesoft.svn.core.wc.SVNInfo; import org.tmatesoft.svn.core.wc.SVNPropertyData; import org.tmatesoft.svn.core.wc.SVNRevision; import org.tmatesoft.svn.core.wc2.SvnTarget; @@ -63,7 +64,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { public void getProperty(@NotNull SvnTarget target, @NotNull String property, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable ISVNPropertyHandler handler) throws VcsException { List<String> parameters = new ArrayList<String>(); @@ -77,7 +78,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { @Override public void list(@NotNull SvnTarget target, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable ISVNPropertyHandler handler) throws VcsException { List<String> parameters = new ArrayList<String>(); fillListParameters(target, revision, depth, parameters, true); @@ -90,7 +91,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { public void setProperty(@NotNull File file, @NotNull String property, @Nullable SVNPropertyValue value, - @Nullable SVNDepth depth, + @Nullable Depth depth, boolean force) throws VcsException { runSetProperty(SvnTarget.fromFile(file), property, null, depth, value, force); } @@ -101,7 +102,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { currentProperties.putAll(properties); for (String propertyName : currentProperties.nameSet()) { - setProperty(file, propertyName, currentProperties.getSVNPropertyValue(propertyName), SVNDepth.EMPTY, true); + setProperty(file, propertyName, currentProperties.getSVNPropertyValue(propertyName), Depth.EMPTY, true); } } @@ -109,7 +110,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { private SVNProperties collectPropertiesToDelete(@NotNull File file) throws VcsException { final SVNProperties result = new SVNProperties(); - list(SvnTarget.fromFile(file), null, SVNDepth.EMPTY, new ISVNPropertyHandler() { + list(SvnTarget.fromFile(file), null, Depth.EMPTY, new ISVNPropertyHandler() { @Override public void handleProperty(File path, SVNPropertyData property) throws SVNException { // null indicates property will be deleted @@ -140,7 +141,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { private void runSetProperty(@NotNull SvnTarget target, @NotNull String property, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable SVNPropertyValue value, boolean force) throws VcsException { List<String> parameters = new ArrayList<String>(); @@ -169,7 +170,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { private void fillListParameters(@NotNull SvnTarget target, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @NotNull List<String> parameters, boolean verbose) { CommandUtil.put(parameters, target); @@ -266,7 +267,7 @@ public class CmdPropertyClient extends BaseSvnClient implements PropertyClient { // base should be resolved manually - could not set revision to BASE to get revision property if (SVNRevision.BASE.equals(revision)) { - SVNInfo info = myVcs.getInfo(path, SVNRevision.BASE); + Info info = myVcs.getInfo(path, SVNRevision.BASE); result = info != null ? info.getRevision().getNumber() : -1; } diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/PropertyClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/PropertyClient.java index b44f7ea12e75..1b61d59c0e20 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/PropertyClient.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/PropertyClient.java @@ -5,8 +5,8 @@ import com.intellij.openapi.vfs.CharsetToolkit; import com.intellij.util.LineSeparator; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.idea.svn.api.Depth; import org.jetbrains.idea.svn.api.SvnClient; -import org.tmatesoft.svn.core.SVNDepth; import org.tmatesoft.svn.core.SVNProperties; import org.tmatesoft.svn.core.SVNPropertyValue; import org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions; @@ -38,18 +38,18 @@ public interface PropertyClient extends SvnClient { void getProperty(@NotNull SvnTarget target, @NotNull String property, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable ISVNPropertyHandler handler) throws VcsException; void list(@NotNull SvnTarget target, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable ISVNPropertyHandler handler) throws VcsException; void setProperty(@NotNull File file, @NotNull String property, @Nullable SVNPropertyValue value, - @Nullable SVNDepth depth, + @Nullable Depth depth, boolean force) throws VcsException; void setProperties(@NotNull File file, @NotNull SVNProperties properties) throws VcsException; diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/SvnKitPropertyClient.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/SvnKitPropertyClient.java index 64343927be11..4ad3f10afccc 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/SvnKitPropertyClient.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/properties/SvnKitPropertyClient.java @@ -4,6 +4,7 @@ import com.intellij.openapi.vcs.VcsException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.idea.svn.api.BaseSvnClient; +import org.jetbrains.idea.svn.api.Depth; import org.jetbrains.idea.svn.commandLine.SvnBindException; import org.tmatesoft.svn.core.*; import org.tmatesoft.svn.core.wc.*; @@ -50,7 +51,7 @@ public class SvnKitPropertyClient extends BaseSvnClient implements PropertyClien public void getProperty(@NotNull SvnTarget target, @NotNull String property, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable ISVNPropertyHandler handler) throws VcsException { runGetProperty(target, property, revision, depth, handler); } @@ -58,7 +59,7 @@ public class SvnKitPropertyClient extends BaseSvnClient implements PropertyClien @Override public void list(@NotNull SvnTarget target, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable ISVNPropertyHandler handler) throws VcsException { runGetProperty(target, null, revision, depth, handler); } @@ -67,10 +68,10 @@ public class SvnKitPropertyClient extends BaseSvnClient implements PropertyClien public void setProperty(@NotNull File file, @NotNull String property, @Nullable SVNPropertyValue value, - @Nullable SVNDepth depth, + @Nullable Depth depth, boolean force) throws VcsException { try { - createClient().doSetProperty(file, property, value, force, depth, null, null); + createClient().doSetProperty(file, property, value, force, toDepth(depth), null, null); } catch (SVNException e) { throw new SvnBindException(e); @@ -114,15 +115,15 @@ public class SvnKitPropertyClient extends BaseSvnClient implements PropertyClien private void runGetProperty(@NotNull SvnTarget target, @Nullable String property, @Nullable SVNRevision revision, - @Nullable SVNDepth depth, + @Nullable Depth depth, @Nullable ISVNPropertyHandler handler) throws VcsException { SVNWCClient client = createClient(); try { if (target.isURL()) { - client.doGetProperty(target.getURL(), property, target.getPegRevision(), revision, depth, handler); + client.doGetProperty(target.getURL(), property, target.getPegRevision(), revision, toDepth(depth), handler); } else { - client.doGetProperty(target.getFile(), property, target.getPegRevision(), revision, depth, handler, null); + client.doGetProperty(target.getFile(), property, target.getPegRevision(), revision, toDepth(depth), handler, null); } } catch (SVNException e) { throw new VcsException(e); |