本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate方法的典型用法代码示例。如果您正苦于以下问题:Java SVNUpdateClient.doUpdate方法的具体用法?Java SVNUpdateClient.doUpdate怎么用?Java SVNUpdateClient.doUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tmatesoft.svn.core.wc.SVNUpdateClient
的用法示例。
在下文中一共展示了SVNUpdateClient.doUpdate方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performSVNupdate
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
* @param svnPathString
* String which contains the local SVN folder path.
* @return Error code. If true --> SVN Operation failed.
*/
public final boolean performSVNupdate(final String svnPathString) {
SfdcCommander commander = SfdcCommander.getInstance();
boolean error = false;
File svnPath = new File(svnPathString);
// checkout
try {
ISVNAuthenticationManager authManager = getAuthManager(config);
SVNUpdateClient updateClient = new SVNUpdateClient(authManager,
SVNWCUtil.createDefaultOptions(true));
updateClient.doUpdate(svnPath, SVNRevision.HEAD, SVNDepth.INFINITY,
true, true);
commander.info("SVN Update successfully processed.");
} catch (SVNException e) {
commander.info(e.getMessage());
error = true;
}
return error;
}
示例2: doUpdate
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
* 更新文件
*
* @param path
* @return
*/
public Long doUpdate(File... files) {
SVNUpdateClient updateClient = clientManager.getUpdateClient();
updateClient.setIgnoreExternals(false);
long version = 0;
long tempVersion = 0;
for (File file : files) {
try {
tempVersion = updateClient.doUpdate(file, SVNRevision.HEAD,
SVNDepth.INFINITY, false, false);
logger.info("update succcess");
version = (version > tempVersion) ? version : tempVersion;
} catch (SVNException e) {
logger.error("update error");
return null;
}
}
return version;
}
示例3: update
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public static long update(SVNClientManager clientManager, File wcPath, SVNRevision updateToRevision, boolean isRecursive)
throws SVNException {
SVNUpdateClient updateClient = clientManager.getUpdateClient();
/*
* sets externals not to be ignored during the update
*/
updateClient.setIgnoreExternals(false);
/*
* returns the number of the revision wcPath was updated to
*/
return updateClient.doUpdate(wcPath, updateToRevision, SVNDepth.fromRecurse(isRecursive), false, false);
}
示例4: update
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public long update(final File file, SVNRevision revision, SVNDepth i) throws SVNException {
if (i == null) {
i = SVNDepth.INFINITY;
}
// JDIO.removeDirectoryOrFile(file);
file.mkdirs();
final SVNUpdateClient updateClient = getUpdateClient();
updateClient.setIgnoreExternals(false);
if (revision == null) {
revision = SVNRevision.HEAD;
}
try {
// getWCClient().doAdd(path, force, mkdir, climbUnversionedParents,
// depth, includeIgnored, makeParents);
// long ret = updateClient.doCheckout(svnurl, file, revision,
// revision, i, true);
Log.L.info("SVN Update at " + file + " to Revision " + revision + " depths:" + i + " " + svnurl);
long ret = updateClient.doUpdate(file, revision, i, false, true);
if (ret < 0) {
// no working copy?
ret = updateClient.doCheckout(svnurl, file, revision, revision, i, true);
}
return ret;
} catch (final Exception e) {
Log.L.info(e.getMessage());
Log.L.info("SVN Checkout at " + file + " " + svnurl);
return updateClient.doCheckout(svnurl, file, revision, revision, i, true);
} finally {
Log.L.info("SVN Update finished");
}
}
示例5: update
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
private static long update(File wcPath, SVNRevision updateToRevision, boolean isRecursive) throws SVNException {
SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
/*
* sets externals not to be ignored during the update
*/
updateClient.setIgnoreExternals(false);
/*
* returns the number of the revision wcPath was updated to
*/
return updateClient.doUpdate(wcPath, updateToRevision, SVNDepth.fromRecurse(isRecursive), false, false);
}
示例6: update
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
* Updates a working copy (brings changes from the repository into the working copy).
* Like 'svn update PATH' command; It's done by invoking
* <p/>
* SVNUpdateClient.doUpdate(File file, SVNRevision revision, boolean recursive)
* <p/>
* which takes the following parameters:
* <p/>
* file - a working copy entry that is to be updated;
* <p/>
* revision - a revision to which a working copy is to be updated;
* <p/>
* recursive - if true and an entry is a directory then doUpdate(..) recursively
* updates the entire directory, otherwise - only child entries of the directory;
*/
public static long update( SVNUpdateClient updateClient, File wcPath, SVNRevision updateToRevision,
boolean isRecursive )
throws SVNException
{
//SVNUpdateClient updateClient = clientManager.getUpdateClient();
/*
* sets externals not to be ignored during the update
*/
updateClient.setIgnoreExternals( false );
/*
* returns the number of the revision wcPath was updated to
*/
return updateClient.doUpdate( wcPath, updateToRevision, isRecursive );
}