本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNWCClient.doSetWCFormat方法的典型用法代码示例。如果您正苦于以下问题:Java SVNWCClient.doSetWCFormat方法的具体用法?Java SVNWCClient.doSetWCFormat怎么用?Java SVNWCClient.doSetWCFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tmatesoft.svn.core.wc.SVNWCClient
的用法示例。
在下文中一共展示了SVNWCClient.doSetWCFormat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: upgrade
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
private static void upgrade(@NotNull File path,
@NotNull WorkingCopyFormat format,
@NotNull SVNWCClient client,
@Nullable ProgressTracker handler) throws SVNException, VcsException {
// fake event indicating upgrade start
callHandler(handler, createEvent(path, EventAction.UPDATE_COMPLETED));
client.doSetWCFormat(path, format.getFormat());
}
示例2: run
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public void run(@NotNull final ProgressIndicator indicator) {
ProjectLevelVcsManager.getInstanceChecked(myProject).startBackgroundVcsOperation();
indicator.setIndeterminate(true);
final boolean supportsChangelists = myNewFormat.supportsChangelists();
if (supportsChangelists) {
myBeforeChangeLists = ChangeListManager.getInstance(myProject).getChangeListsCopy();
}
final SVNWCClient wcClient = myVcs.createWCClient();
wcClient.setEventHandler(new ISVNEventHandler() {
@Override
public void handleEvent(SVNEvent event, double progress) throws SVNException {
if (SVNEventAction.UPGRADED_PATH.equals(event.getAction()) && event.getFile() != null) {
indicator.setText2("Upgraded path " + VcsUtil.getPathForProgressPresentation(event.getFile()));
}
}
@Override
public void checkCancelled() throws SVNCancelException {
indicator.checkCanceled();
}
});
try {
for (WCInfo wcInfo : myWcInfos) {
File path = new File(wcInfo.getPath());
if (! wcInfo.isIsWcRoot()) {
path = SvnUtil.getWorkingCopyRoot(path);
}
try {
if (WorkingCopyFormat.ONE_DOT_SEVEN.equals(myNewFormat)) {
indicator.setText(SvnBundle.message("action.Subversion.cleanup.progress.text", path.getAbsolutePath()));
wcClient.doCleanup(path);
}
indicator.setText(SvnBundle.message("action.change.wcopy.format.task.progress.text", path.getAbsolutePath(),
SvnUtil.formatRepresentation(wcInfo.getFormat()), SvnUtil.formatRepresentation(myNewFormat)));
wcClient.doSetWCFormat(path, myNewFormat.getFormat());
} catch (Throwable e) {
myExceptions.add(e);
}
}
}
finally {
ProjectLevelVcsManager.getInstance(myProject).stopBackgroundVcsOperation();
// to map to native
if (supportsChangelists) {
SvnVcs.getInstance(myProject).processChangeLists(myBeforeChangeLists);
}
ApplicationManager.getApplication().getMessageBus().syncPublisher(SvnVcs.WC_CONVERTED).run();
}
}
示例3: mergePath
import org.tmatesoft.svn.core.wc.SVNWCClient; //导入方法依赖的package包/类
public List<String> mergePath(String url1, String url2, String destino) throws SVNException {
//SVNWCClient wCClient = cliente.getWCClient();
SVNWCClient wCClient = SVNClientManager.newInstance().getWCClient();
SVNDiffClient diffClient = cliente.getDiffClient();
//criando o DefaultOptions
DefaultSVNOptions svnOptions = (DefaultSVNOptions) diffClient.getOptions();
ConflictResolverHandler con = new ConflictResolverHandler();
svnOptions.setConflictHandler(con);
File ws1 = new File(url1);
File ws2 = new File(url2);
File wsDestino = new File(destino);
wCClient.doSetWCFormat(ws1, SVNAdminAreaFactory.WC_FORMAT_14);
wCClient.doSetWCFormat(ws2, SVNAdminAreaFactory.WC_FORMAT_14);
wCClient.doSetWCFormat(wsDestino, SVNAdminAreaFactory.WC_FORMAT_14);
cliente.getDiffClient().doMerge(ws1, SVNRevision.HEAD, ws2, SVNRevision.HEAD, wsDestino, SVNDepth.INFINITY, true, false, false, false);
return con.getConflitos();
}