use of org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions in project intellij-community by JetBrains.
the class Idea87218Test method main.
public static void main(String[] args) {
try {
SVNStatusClient client = new SVNStatusClient((ISVNRepositoryPool) null, new DefaultSVNOptions());
File src = new File(ourWcPath, "file1.txt");
SVNStatus status = client.doStatus(src, false);
assert status != null && SVNStatusType.STATUS_NORMAL.equals(status.getNodeStatus());
File dir = new File(ourWcPath, "unversioned");
SVNStatus dirStatus = client.doStatus(dir, false);
assert dirStatus != null && SVNStatusType.STATUS_UNVERSIONED.equals(dirStatus.getNodeStatus());
File dst = new File(dir, "file1.txt");
/*
final SVNCopyClient copyClient = new SVNCopyClient((ISVNRepositoryPool)null, new DefaultSVNOptions());
final SVNCopySource svnCopySource = new SVNCopySource(SVNRevision.UNDEFINED, SVNRevision.WORKING, src);
copyClient.doCopy(new SVNCopySource[]{svnCopySource}, dst, true, false, true);
*/
SVNMoveClient moveClient = new SVNMoveClient((ISVNRepositoryPool) null, new DefaultSVNOptions());
moveClient.doMove(src, dst);
} catch (SVNException e) {
e.printStackTrace();
}
}
use of org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions in project intellij-community by JetBrains.
the class Idea93475Test method main.
public static void main(String[] args) {
try {
SVNStatusClient client = new SVNStatusClient((ISVNRepositoryPool) null, new DefaultSVNOptions());
File src = new File(ourWcPath, "cde\\text1.txt");
assertStatus(client, src, SVNStatusType.STATUS_NORMAL);
File src1 = new File(ourWcPath, "cde\\text2.txt");
assertStatus(client, src, SVNStatusType.STATUS_NORMAL);
File dir = new File(ourWcPath, "abc");
assertStatus(client, dir, SVNStatusType.STATUS_ADDED);
File dst = new File(dir, "text1.txt");
File dst1 = new File(dir, "text2.txt");
SVNMoveClient moveClient = new SVNMoveClient((ISVNRepositoryPool) null, new DefaultSVNOptions());
moveClient.doMove(src, dst);
moveClient.doMove(src1, dst1);
assertStatus(client, dst, SVNStatusType.STATUS_ADDED);
assertStatus(client, dst1, SVNStatusType.STATUS_ADDED);
assert client.doStatus(dst, false).getCopyFromURL() != null;
assert client.doStatus(dst1, false).getCopyFromURL() != null;
// now rename the directory
final File renamedDir = new File(ourWcPath, "abc_renamed");
moveClient.doMove(dir, renamedDir);
File dstInRenamed = new File(renamedDir, "text1.txt");
File dst1InRenamed = new File(renamedDir, "text2.txt");
assertStatus(client, dstInRenamed, SVNStatusType.STATUS_ADDED);
assertStatus(client, dst1InRenamed, SVNStatusType.STATUS_ADDED);
assert client.doStatus(dstInRenamed, false).getCopyFromURL() != null;
assert client.doStatus(dst1InRenamed, false).getCopyFromURL() != null;
} catch (SVNException e) {
e.printStackTrace();
}
}
Aggregations