本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNUpdateClient.setIgnoreExternals方法的典型用法代码示例。如果您正苦于以下问题:Java SVNUpdateClient.setIgnoreExternals方法的具体用法?Java SVNUpdateClient.setIgnoreExternals怎么用?Java SVNUpdateClient.setIgnoreExternals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tmatesoft.svn.core.wc.SVNUpdateClient
的用法示例。
在下文中一共展示了SVNUpdateClient.setIgnoreExternals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkout
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
@Override
public void checkout(@NotNull SvnTarget source,
@NotNull File destination,
@Nullable SVNRevision revision,
@Nullable Depth depth,
boolean ignoreExternals,
boolean force,
@NotNull WorkingCopyFormat format,
@Nullable ProgressTracker handler) throws VcsException {
assertUrl(source);
validateFormat(format, getSupportedFormats());
SVNUpdateClient client = myVcs.getSvnKitManager().createUpdateClient();
client.setIgnoreExternals(ignoreExternals);
client.setEventHandler(toEventHandler(handler));
try {
runCheckout(client, format, source, destination, revision, depth, force);
}
catch (SVNException e) {
throw new SvnBindException(e);
}
}
示例2: export
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
@Override
public void export(@NotNull SvnTarget from,
@NotNull File to,
@Nullable SVNRevision revision,
@Nullable Depth depth,
@Nullable String nativeLineEnd,
boolean force,
boolean ignoreExternals,
@Nullable ProgressTracker handler) throws VcsException {
SVNUpdateClient client = myVcs.getSvnKitManager().createUpdateClient();
client.setEventHandler(toEventHandler(handler));
client.setIgnoreExternals(ignoreExternals);
try {
if (from.isFile()) {
client.doExport(from.getFile(), to, from.getPegRevision(), revision, nativeLineEnd, force, toDepth(depth));
}
else {
client.doExport(from.getURL(), to, from.getPegRevision(), revision, nativeLineEnd, force, toDepth(depth));
}
}
catch (SVNException e) {
throw new SvnBindException(e);
}
}
示例3: doCheckout
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
* 签出到指定目录
*
* @return
*/
public Long doCheckout(String path) {
File workDir = new File(path);
if (!workDir.exists()) {
logger.info("workpath not exists, create workpath");
workDir.mkdirs();
}
try {
SVNUpdateClient updateClient = clientManager.getUpdateClient();
updateClient.setIgnoreExternals(false);
long version = updateClient
.doCheckout(repositoryURL, workDir, SVNRevision.HEAD,
SVNRevision.HEAD, SVNDepth.INFINITY, true);
logger.info("checkout success");
return version;
} catch (SVNException svne) {
logger.error("checkout error :" + svne.getMessage());
return null;
}
}
示例4: 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;
}
示例5: checkoutTest
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public void checkoutTest() throws SVNException {
String checkoutPath = "svn://localhost";
String username = "integration";
String password = "integration";
String checkoutRootPath = new File("/home/jeremie/Developpement/checkoutsvn").getAbsolutePath();
DAVRepositoryFactory.setup();
final SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(checkoutPath));
repository.setAuthenticationManager(SVNWCUtil.createDefaultAuthenticationManager(username, password));
final SVNClientManager clientManager = SVNClientManager.newInstance(null, repository.getAuthenticationManager());
final SVNUpdateClient updateClient = clientManager.getUpdateClient();
updateClient.setIgnoreExternals(false);
final SVNNodeKind nodeKind = repository.checkPath("", -1);
if (nodeKind == SVNNodeKind.NONE) {
System.err.println("There is no entry at '" + checkoutPath + "'.");
System.exit(1);
} else if (nodeKind == SVNNodeKind.FILE) {
System.err.println("The entry at '" + checkoutPath + "' is a file while a directory was expected.");
System.exit(1);
}
System.out.println("*** CHECKOUT SVN Trunk/Branches ***");
System.out.println("Checkout source: " + checkoutPath);
System.out.println("Checkout destination: " + checkoutRootPath);
System.out.println("...");
try {
traverse(updateClient, repository, checkoutPath, checkoutRootPath, "", true);
} catch (final Exception e) {
System.err.println("ERROR : " + e.getMessage());
e.printStackTrace(System.err);
System.exit(-1);
}
System.out.println("");
System.out.println("Repository latest revision: " + repository.getLatestRevision());
}
示例6: getClient
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
@NotNull
private SVNUpdateClient getClient() {
SVNUpdateClient client = myVcs.getSvnKitManager().createUpdateClient();
client.setEventHandler(toEventHandler(myDispatcher));
client.setIgnoreExternals(myIgnoreExternals);
client.setUpdateLocksOnDemand(myLocksOnDemand);
return client;
}
示例7: checkout
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public static long checkout(SVNClientManager clientManager, SVNURL url, SVNRevision revision, File destPath, boolean isRecursive)
throws SVNException {
SVNUpdateClient updateClient = clientManager.getUpdateClient();
/*
* sets externals not to be ignored during the checkout
*/
updateClient.setIgnoreExternals(false);
/*
* returns the number of the revision at which the working copy is
*/
return updateClient.doCheckout(url, destPath, revision, revision, SVNDepth.fromRecurse(isRecursive), false);
}
示例8: 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);
}
示例9: switchToURL
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public static long switchToURL(SVNClientManager clientManager, File wcPath, SVNURL url, SVNRevision updateToRevision,
boolean isRecursive) throws SVNException {
SVNUpdateClient updateClient = clientManager.getUpdateClient();
/*
* sets externals not to be ignored during the switch
*/
updateClient.setIgnoreExternals(false);
/*
* returns the number of the revision wcPath was updated to
*/
return updateClient.doSwitch(wcPath, url, SVNRevision.UNDEFINED, updateToRevision, SVNDepth.getInfinityOrFilesDepth(isRecursive),
false, false);
}
示例10: performCheckOut
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
* @param svnPathString
* String which contains the local SVN folder path.
* @param aConfig
* CommanderConfig for SVN Connect.
* @return Error code. If true --> SVN Operation failed.
*/
public final boolean performCheckOut(final String svnPathString,
final CommanderConfig aConfig) {
SfdcCommander commander = SfdcCommander.getInstance();
boolean error = false;
File svn_logFolder = new File(svnPathString + "/.svn");
File svnPath = new File(svnPathString);
// checkout
if (!svn_logFolder.exists()) {
try {
SVNURL url = SVNURL.parseURIDecoded(
aConfig.getSvnConfig().getSvnRepository());
ISVNAuthenticationManager authManager = getAuthManager(aConfig);
SVNUpdateClient updateClient = new SVNUpdateClient(authManager,
SVNWCUtil.createDefaultOptions(true));
updateClient.setIgnoreExternals(false);
updateClient.doCheckout(url, svnPath, SVNRevision.HEAD,
SVNRevision.HEAD, SVNDepth.INFINITY, true);
commander.info("SVN Checkout successfully processed.");
} catch (SVNException e) {
commander.info(e.getErrorMessage().getFullMessage());
error = true;
}
}
return error;
}
示例11: 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");
}
}
示例12: downloadCode
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
* Faz o checkout do repositório. O atributo src_path deve ser setado.
*/
@Override
public void downloadCode(File path) {
System.out.println("Downloading code...");
this.src_path = path;
FileUtils.deleteRecursive(path);
SVNUpdateClient update_client = svn_client.getUpdateClient();
update_client.setIgnoreExternals(false);
try {
update_client.doCheckout(SVN_url, path, null,
revision_range.getEndRevision(), SVNDepth.INFINITY, false);
} catch (SVNException e) {
e.printStackTrace();
}
}
示例13: export
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public static long export( SVNClientManager clientManager, SVNURL url, SVNRevision revision, File destPath,
boolean isRecursive )
throws SVNException
{
SVNUpdateClient updateClient = clientManager.getUpdateClient();
/*
* sets externals not to be ignored during the checkout
*/
updateClient.setIgnoreExternals( false );
/*
* returns the number of the revision at which the working copy is
*/
return updateClient.doExport( url, destPath, revision, revision, "native", true, isRecursive );
}
示例14: checkout
import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
private static long checkout(SVNURL url,
SVNRevision revision, File destPath, boolean isRecursive, boolean allowUnversionedObstructions)
throws SVNException {
SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
/*
* sets externals not to be ignored during the checkout
*/
updateClient.setIgnoreExternals(false);
/*
* returns the number of the revision at which the working copy is
*/
return updateClient.doCheckout(url, destPath, revision, revision, SVNDepth.fromRecurse(isRecursive),
allowUnversionedObstructions);
}
示例15: 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);
}