本文整理汇总了Java中org.tmatesoft.svn.core.wc.ISVNInfoHandler类的典型用法代码示例。如果您正苦于以下问题:Java ISVNInfoHandler类的具体用法?Java ISVNInfoHandler怎么用?Java ISVNInfoHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISVNInfoHandler类属于org.tmatesoft.svn.core.wc包,在下文中一共展示了ISVNInfoHandler类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInfo
import org.tmatesoft.svn.core.wc.ISVNInfoHandler; //导入依赖的package包/类
/**
* Returns an ArrayLIst with Info for all files found in file.
*
* @param file
* @return
*/
public java.util.List<SVNInfo> getInfo(final File file) {
final java.util.List<SVNInfo> ret = new ArrayList<SVNInfo>();
try {
getWCClient().doInfo(file, SVNRevision.UNDEFINED, SVNRevision.WORKING, SVNDepth.getInfinityOrEmptyDepth(true), null, new ISVNInfoHandler() {
@Override
public void handleInfo(final SVNInfo info) {
ret.add(info);
}
});
} catch (final SVNException e) {
e.printStackTrace();
}
return ret;
}
示例2: getRevision
import org.tmatesoft.svn.core.wc.ISVNInfoHandler; //导入依赖的package包/类
public long getRevision(final File resource) throws SVNException {
final long[] ret = new long[] { -1 };
getWCClient().doInfo(resource, SVNRevision.UNDEFINED, SVNRevision.WORKING, SVNDepth.EMPTY, null, new ISVNInfoHandler() {
@Override
public void handleInfo(final SVNInfo info) {
final long rev = info.getCommittedRevision().getNumber();
if (rev > ret[0]) {
ret[0] = rev;
}
}
});
return ret[0];
}
示例3: showInfo
import org.tmatesoft.svn.core.wc.ISVNInfoHandler; //导入依赖的package包/类
public static void showInfo(SVNClientManager clientManager, File wcPath, SVNRevision revision, boolean isRecursive,
ISVNInfoHandler infoHandler) throws SVNException {
/*
* InfoHandler displays information for each entry in the console (in
* the manner of the native Subversion command line client)
*/
clientManager.getWCClient().doInfo(wcPath, SVNRevision.UNDEFINED, revision, SVNDepth.getInfinityOrEmptyDepth(isRecursive), null,
infoHandler);
}
示例4: remoteUrlExist
import org.tmatesoft.svn.core.wc.ISVNInfoHandler; //导入依赖的package包/类
public boolean remoteUrlExist( ScmProviderRepository repository, CommandParameters parameters )
throws ScmException
{
SvnJavaScmProviderRepository javaRepo = (SvnJavaScmProviderRepository) repository;
String url = ( (SvnScmProviderRepository) repository ).getUrl();
try
{
javaRepo.getClientManager().getWCClient().doInfo( SVNURL.parseURIEncoded( url ), SVNRevision.HEAD,
SVNRevision.HEAD, SVNDepth.EMPTY, new ISVNInfoHandler()
{
public void handleInfo( SVNInfo svnInfo )
throws SVNException
{
svnInfo.getAuthor();
}
} );
}
catch ( SVNException e )
{
if ( e.getMessage().indexOf( "E170000" ) > -1 )
{
return false;
}
throw new ScmException( e.getMessage(), e );
}
return true;
}
示例5: doInfo
import org.tmatesoft.svn.core.wc.ISVNInfoHandler; //导入依赖的package包/类
@Override
public SVNInfo doInfo(File path, SVNRevision revision) throws SVNException {
final SVNInfo[] infoArr = new SVNInfo[1];
doInfo(path, SVNRevision.UNDEFINED, revision, SVNDepth.EMPTY, null, new ISVNInfoHandler() {
@Override
public void handleInfo(SVNInfo info) throws SVNException {
infoArr[0] = info;
}
});
return infoArr[0];
}
示例6: doInfo
import org.tmatesoft.svn.core.wc.ISVNInfoHandler; //导入依赖的package包/类
@Override
public SVNInfo doInfo(File path, SVNRevision revision) throws SVNException {
final SVNInfo[] infoArr = new SVNInfo[1];
doInfo(path, SVNRevision.UNDEFINED, revision, SVNDepth.INFINITY, null, new ISVNInfoHandler() {
@Override
public void handleInfo(SVNInfo info) throws SVNException {
infoArr[0] = info;
}
});
return infoArr[0];
}
示例7: create
import org.tmatesoft.svn.core.wc.ISVNInfoHandler; //导入依赖的package包/类
public static InfoCallback create(final ISVNInfoHandler callback, final Consumer<SVNException> exceptionConsumer) {
return new InfoCallback() {
@Override
public void singleInfo(Info info) {
if (callback == null) return;
try {
callback.handleInfo(InfoConvertor.convert(info));
}
catch (SVNException e) {
exceptionConsumer.consume(e);
}
}
};
}