本文整理汇总了Java中org.tmatesoft.svn.core.wc.ISVNOptions类的典型用法代码示例。如果您正苦于以下问题:Java ISVNOptions类的具体用法?Java ISVNOptions怎么用?Java ISVNOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISVNOptions类属于org.tmatesoft.svn.core.wc包,在下文中一共展示了ISVNOptions类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: checkout
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
private File checkout(String scmUrl) throws Exception {
ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
ISVNAuthenticationManager isvnAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(null, null, (char[]) null, false);
SVNClientManager svnClientManager = SVNClientManager.newInstance(options, isvnAuthenticationManager);
File out = temp.newFolder();
SVNUpdateClient updateClient = svnClientManager.getUpdateClient();
SvnCheckout co = updateClient.getOperationsFactory().createCheckout();
co.setUpdateLocksOnDemand(updateClient.isUpdateLocksOnDemand());
co.setSource(SvnTarget.fromURL(SVNURL.parseURIEncoded(scmUrl), SVNRevision.HEAD));
co.setSingleTarget(SvnTarget.fromFile(out));
co.setRevision(SVNRevision.HEAD);
co.setDepth(SVNDepth.INFINITY);
co.setAllowUnversionedObstructions(false);
co.setIgnoreExternals(updateClient.isIgnoreExternals());
co.setExternalsHandler(SvnCodec.externalsHandler(updateClient.getExternalsHandler()));
co.setTargetWorkingCopyFormat(wcVersion);
co.run();
return out;
}
开发者ID:SonarSource,项目名称:sonar-scm-svn,代码行数:20,代码来源:SvnTest.java
示例2: initializeClientManager
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
private void initializeClientManager()
{
/*
* Creates a default run-time configuration options driver. Default options
* created in this way use the Subversion run-time configuration area (for
* instance, on a Windows platform it can be found in the '%APPDATA%\Subversion'
* directory).
*
* readonly = true - not to save any configuration changes that can be done
* during the program run to a config file (config settings will only
* be read to initialize; to enable changes the readonly flag should be set
* to false).
*
*/
ISVNOptions options = SVNWCUtil.createDefaultOptions( true );
clientManager = SVNClientManager.newInstance( options, getAuthManager() );
}
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:18,代码来源:SvnJavaScmProviderRepository.java
示例3: initializeRepository
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public static void initializeRepository( File repositoryRoot )
throws Exception
{
if ( repositoryRoot.exists() )
{
FileUtils.deleteDirectory( repositoryRoot );
}
Assert.assertTrue( "Could not make repository root directory: " + repositoryRoot.getAbsolutePath(),
repositoryRoot.mkdirs() );
//ScmTestCase.execute( repositoryRoot.getParentFile(), SVNADMIN_COMMAND_LINE, "create " + repositoryRoot.getName() );
if (repositoryRoot.exists())
{
FileUtils.cleanDirectory( repositoryRoot );
}
ISVNOptions options = SVNWCUtil.createDefaultOptions( true );
SVNClientManager.newInstance().getAdminClient().doCreateRepository( repositoryRoot, null, true, true );
loadSvnDump( repositoryRoot,
new SvnJavaScmTestUtils().getClass().getClassLoader().getResourceAsStream( "tck/tck.dump" ) );
}
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:26,代码来源:SvnJavaScmTestUtils.java
示例4: getOptions
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public ISVNOptions getOptions() {
if (myOptions == null) {
File path = new File(getConfigurationDirectory());
myOptions = SVNWCUtil.createDefaultOptions(path.getAbsoluteFile(), true);
}
return myOptions;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:SvnConfiguration.java
示例5: newSvnClientManager
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
static SVNClientManager newSvnClientManager(SvnConfiguration configuration) {
ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
final char[] passwordValue = getCharsOrNull(configuration.password());
final char[] passPhraseValue = getCharsOrNull(configuration.passPhrase());
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(
null,
configuration.username(),
passwordValue,
configuration.privateKey(),
passPhraseValue,
false);
return SVNClientManager.newInstance(options, authManager);
}
开发者ID:SonarSource,项目名称:sonar-scm-svn,代码行数:14,代码来源:SvnPlugin.java
示例6: getOptions
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public ISVNOptions getOptions(Project project) {
if (myOptions == null) {
File path = new File(getConfigurationDirectory());
myOptions = SVNWCUtil.createDefaultOptions(path.getAbsoluteFile(), true);
}
return myOptions;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:SvnConfiguration.java
示例7: checkOutFromSvn
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public static String checkOutFromSvn(String tableId,String project, String modelName) {
//获取SVN驱动选项
ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
// 实例化客户端管理类
SVNClientManager ourClientManager = SVNClientManager.newInstance((DefaultSVNOptions) options, USERNAME, PASSWORD);
SVNURL repositoryURL = null;
// 需要循环seg_*
try {
// 通过客户端管理类获得updateClient类的实例。
SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
int is_h=0;
for (int i = 0; i < 100; i++) {
String seg="seg_"+i;
String url=URL_ROOT + modelM.get("DataFlow") + "/table/";
url+=seg;
String filepath = PATH + seg;
del(filepath);
repositoryURL = SVNURL.parseURIEncoded(url);
boolean b = isURLExist(repositoryURL, "zhangkai05", "zhangkai05");
if(b) {
is_h++;
updateClient.setIgnoreExternals(true);
// 执行check out 操作,返回工作副本的版本号。
long workingVersion = updateClient.doCheckout(repositoryURL, new File(filepath),SVNRevision.HEAD, SVNRevision.HEAD, SVNDepth.INFINITY,false);
//System.out.println(workingVersion + "版本获得成功!");
}
}
//is_h
String file_path = getFile(tableId, PATH, is_h);
return file_path;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
开发者ID:smallbaby,项目名称:datamodelertoetl,代码行数:39,代码来源:Svn.java
示例8: returnChangedDirectories
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public List<String> returnChangedDirectories() {
if (getRepository() == null) {
return null;
}
if (getVersion() == null) {
return null;
}
File repositoryDir = new File(getRepository());
changedDirectories svnChangedDirectories = new changedDirectories();
ISVNAuthenticationManager svnManager = new BasicAuthenticationManager(loginSVN, senhaSVN);
ISVNOptions svnOptions = new DefaultSVNOptions();
SVNLookClient cliLook = new SVNLookClient(svnManager, svnOptions);
try {
cliLook.doGetChangedDirectories(repositoryDir, SVNRevision.create(Long.parseLong(getVersion())), svnChangedDirectories);
} catch (SVNException ex) {
Logger.getLogger(SvnInformation.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
return svnChangedDirectories.getDirectories();
}
开发者ID:gems-uff,项目名称:oceano,代码行数:28,代码来源:SvnInformation.java
示例9: retornaMensagem
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public String retornaMensagem(){
String result = null;
if (getRepository() == null) {
return null;
}
if (getVersion() == null) {
return null;
}
ISVNAuthenticationManager svnManager = new BasicAuthenticationManager("", "");
ISVNOptions svnOptions = new DefaultSVNOptions();
SVNLookClient cliLook = new SVNLookClient(svnManager, svnOptions);
File rep = new File(getRepository());
try {
result = cliLook.doGetLog(rep, SVNRevision.create(Long.parseLong(getVersion())));
} catch (SVNException ex) {
System.out.println("Problema ao fazer svnlook log");
Logger.getLogger(SvnInformation.class.getName()).log(Level.SEVERE, null, ex);
}
return result;
}
开发者ID:gems-uff,项目名称:oceano,代码行数:30,代码来源:SvnInformation.java
示例10: returnChangedDirectories
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public List<String> returnChangedDirectories() {
if (getRepository() == null) {
return null;
}
if (getVersion() == null) {
return null;
}
File repositoryDir = new File(getRepository());
changedDirectories svnChangedDirectories = new changedDirectories();
ISVNAuthenticationManager svnManager = new BasicAuthenticationManager(loginSVN, senhaSVN);
ISVNOptions svnOptions = new DefaultSVNOptions();
SVNLookClient cliLook = new SVNLookClient(svnManager, svnOptions);
try {
cliLook.doGetChangedDirectories(repositoryDir, SVNRevision.create(Long.parseLong(getVersion())), svnChangedDirectories);
} catch (SVNException ex) {
Logger.getLogger(svnInformation.class.getName()).log(Level.SEVERE, null, ex);
return null;
}
return svnChangedDirectories.getDirectories();
}
开发者ID:gems-uff,项目名称:oceano,代码行数:28,代码来源:svnInformation.java
示例11: retornaMensagem
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public String retornaMensagem(){
String result = null;
if (getRepository() == null) {
return null;
}
if (getVersion() == null) {
return null;
}
ISVNAuthenticationManager svnManager = new BasicAuthenticationManager("", "");
ISVNOptions svnOptions = new DefaultSVNOptions();
SVNLookClient cliLook = new SVNLookClient(svnManager, svnOptions);
File rep = new File(getRepository());
try {
result = cliLook.doGetLog(rep, SVNRevision.create(Long.parseLong(getVersion())));
} catch (SVNException ex) {
System.out.println("Problema ao fazer svnlook log");
Logger.getLogger(svnInformation.class.getName()).log(Level.SEVERE, null, ex);
}
return result;
}
开发者ID:gems-uff,项目名称:oceano,代码行数:30,代码来源:svnInformation.java
示例12: AbstractSvnOperation
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
/**
*
* @param option
*/
public AbstractSvnOperation(SvnOptions option) {
// 安装仓库工厂
SVNRepositoryFactoryImpl.setup();
logger.info("SVNRepository Factory setup");
try {
repositoryURL = SVNURL.parseURIEncoded(option.getRepositoryURL());
logger.info("repository URL success");
} catch (SVNException e) {
logger.error("repository URL error");
}
// 驱动选项
ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
this.clientManager = SVNClientManager.newInstance(
(DefaultSVNOptions) options, option.getName(),
option.getPassword());
logger.info("create SVNClientManager success");
this.workpath = option.getWorkPath();
doCheckout();
}
开发者ID:joaquinaimar,项目名称:wizard,代码行数:31,代码来源:AbstractSvnOperation.java
示例13: getClientManager
import org.tmatesoft.svn.core.wc.ISVNOptions; //导入依赖的package包/类
public SVNClientManager getClientManager()
{
ISVNOptions options = SVNWCUtil.createDefaultOptions( true );
String configDirectory = SvnUtil.getSettings().getConfigDirectory();
ISVNAuthenticationManager isvnAuthenticationManager =
SVNWCUtil.createDefaultAuthenticationManager( configDirectory == null ? null : new File( configDirectory ),
getUser(), getPassword(),
SvnUtil.getSettings().isUseAuthCache() );
SVNClientManager svnClientManager = SVNClientManager.newInstance( options, isvnAuthenticationManager );
return svnClientManager;
}
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:17,代码来源:SvnJavaScmProviderRepository.java
注:本文中的org.tmatesoft.svn.core.wc.ISVNOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论