• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ISVNDirEntry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.tigris.subversion.svnclientadapter.ISVNDirEntry的典型用法代码示例。如果您正苦于以下问题:Java ISVNDirEntry类的具体用法?Java ISVNDirEntry怎么用?Java ISVNDirEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ISVNDirEntry类属于org.tigris.subversion.svnclientadapter包,在下文中一共展示了ISVNDirEntry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testListFiles

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public void testListFiles() throws Exception {                        
    File file1 = createFile("file1");
    File file2 = createFile("file2");
    File file3 = createFile("file3");
            
    add(file1);                       
    add(file2);                       
    add(file3);                       
    commit(getWC());
                            
    ISVNDirEntry[] entries1 = getNbClient().getList(getTestUrl().appendPath(getWC().getName()), SVNRevision.HEAD, false);        
    assertEquals(3, entries1.length);
    ISVNDirEntry[] entries2 = getFullWorkingClient().getList(getTestUrl().appendPath(getWC().getName()), SVNRevision.HEAD, false);
    
    assertEntryArrays(entries1, entries2);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ListTestHidden.java


示例2: testListFilesRecursively

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public void testListFilesRecursively() throws Exception {                        
    File folder = createFolder("file1");
    File file1 = createFile(folder, "file1");
    File file2 = createFile(folder, "file2");
    File file3 = createFile(folder, "file3");
            
    add(folder);                       
    add(file1);                       
    add(file2);                       
    add(file3);                       
    commit(getWC());
                    
    ISVNDirEntry[] entries1 = getNbClient().getList(getTestUrl().appendPath(getWC().getName()), SVNRevision.HEAD, true);        
    assertEquals(4, entries1.length);
    ISVNDirEntry[] entries2 = getFullWorkingClient().getList(getTestUrl().appendPath(getWC().getName()), SVNRevision.HEAD, true);
    
    assertEntryArrays(entries1, entries2);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:ListTestHidden.java


示例3: assertEntryArrays

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
protected void assertEntryArrays(ISVNDirEntry[] listedArray, ISVNDirEntry[] refArray) {
    assertEquals(listedArray.length, refArray.length);
    Map<String, ISVNDirEntry> entriesMap = new HashMap<String, ISVNDirEntry>();
    for (ISVNDirEntry e : listedArray) {
        entriesMap.put(e.getPath(), e);
    }
    ISVNDirEntry entry;
    for (int i = 0; i < refArray.length; i++) {
        entry = entriesMap.get(refArray[i].getPath());

        assertNotNull(entry);
        assertEquals(refArray[i].getPath(), entry.getPath());
        assertEquals(refArray[i].getHasProps(), entry.getHasProps());
        assertEquals(refArray[i].getLastChangedRevision(), entry.getLastChangedRevision());
        assertEquals(refArray[i].getLastCommitAuthor(), entry.getLastCommitAuthor());
        assertEquals(refArray[i].getNodeKind(), entry.getNodeKind());
        assertEquals(refArray[i].getSize(), entry.getSize());
        assertEquals(refArray[i].getLastChangedDate().toString(), entry.getLastChangedDate().toString());
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:AbstractCommandTestCase.java


示例4: testList

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
@Test
public void testList() throws Exception {
    executeTarget( "testList" );

    // first using a SVNUrl
    String urlRepos = getProject().getProperty( "urlRepos" );
    ISVNDirEntry[] list = svnClient.getList( new SVNUrl( urlRepos + "/listTest" ), SVNRevision.HEAD, false );
    Assert.assertTrue( list.length > 0 );

    // using a File
    list = svnClient.getList( new File( WORKINGCOPY_DIR, "listTest" ), SVNRevision.BASE, false );
    Assert.assertTrue( list.length > 0 );

    // there is no BASE for listTest because it was added and committed but
    // it needs to be updated before there is a BASE for it
    // this is not what I expected ...
    list = svnClient.getList( WORKINGCOPY_DIR, SVNRevision.BASE, false );
    Assert.assertTrue( list.length == 0 );
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:20,代码来源:SvnTest.java


示例5: testEntry

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
@Test
public void testEntry() throws Exception {
    executeTarget( "testEntry" );

    // first using a SVNUrl
    String urlRepos = getProject().getProperty( "urlRepos" );
    ISVNDirEntry dirEntry = svnClient.getDirEntry( new SVNUrl( urlRepos + "/entryTest/" ), SVNRevision.HEAD );
    Assert.assertNotNull( dirEntry );
    Assert.assertEquals( SVNNodeKind.DIR, dirEntry.getNodeKind() );
    Assert.assertEquals( "entryTest", dirEntry.getPath() );

    // using a File
    dirEntry = svnClient.getDirEntry( new File( WORKINGCOPY_DIR, "entryTest/dir1" ), SVNRevision.BASE );
    Assert.assertNotNull( dirEntry );
    Assert.assertEquals( SVNNodeKind.DIR, dirEntry.getNodeKind() );

    // this does not work for now because working copy dir needs to be updated
    // before
    //    TODO some test are disabled ?       
    //    dirEntry = svnClient.getDirEntry(new File(WORKINGCOPY_DIR+"/entryTest/"),SVNRevision.BASE);
    //    assertNotNull(dirEntry);
    //    assertEquals(SVNNodeKind.DIR,dirEntry.getNodeKind());
    //    assertEquals("entryTest",dirEntry.getPath());   
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:25,代码来源:SvnTest.java


示例6: testBasicLs

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
/**
 * test the basic SVNClient.list functionality
 * @throws Throwable
 */
public void testBasicLs() throws Throwable
{
    // create the working copy
    OneTest thisTest = new OneTest("basicLs",getGreekTestConfig());

    // list the repository root dir
    ISVNDirEntry[] entries = client.getList(thisTest.getWCPath(), SVNRevision.HEAD, false);
    thisTest.getExpectedWC().check(entries,"", false);

    // list directory A
    entries = client.getList(new File(thisTest.getWCPath()+"/A"), SVNRevision.HEAD, false);
    thisTest.getExpectedWC().check(entries,"A", false);

    // list directory A in BASE revision
    entries = client.getList(new File(thisTest.getWCPath()+"/A"), SVNRevision.BASE, false);
    thisTest.getExpectedWC().check(entries,"A", false);

    // list file A/mu
    entries = client.getList(new File(thisTest.getWCPath()+"/A/mu"), SVNRevision.HEAD, false);
    thisTest.getExpectedWC().check(entries,"A/mu");
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:26,代码来源:LsTest.java


示例7: testGetDirEntryUrl

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public void testGetDirEntryUrl() throws Throwable {
    // create the working copy
    OneTest thisTest = new OneTest("basicGetDirEntryUrl",getGreekTestConfig());
    
    // get the dirEntry of a directory first
    ISVNDirEntry entry = client.getDirEntry(new SVNUrl(thisTest.getUrl()+"/A"), SVNRevision.HEAD);
    assertNotNull(entry);
    assertEquals(SVNNodeKind.DIR, entry.getNodeKind());
    assertEquals(0, entry.getSize());
    assertEquals("A", entry.getPath());
    assertEquals(TEST_USER, entry.getLastCommitAuthor());
    assertNotNull(entry.getLastChangedDate());
    
    // then of a file
    entry = client.getDirEntry(new SVNUrl(thisTest.getUrl()+"/A/mu"), SVNRevision.HEAD);
    assertNotNull(entry);
    assertEquals(SVNNodeKind.FILE, entry.getNodeKind());
    assertEquals("mu", entry.getPath());
    assertEquals(TEST_USER, entry.getLastCommitAuthor());
    assertNotNull(entry.getLastChangedDate());
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:22,代码来源:LsTest.java


示例8: testGetDirEntryFile

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public void testGetDirEntryFile() throws Throwable {
    // create the working copy
    OneTest thisTest = new OneTest("basicGetDirEntryFile",getGreekTestConfig());
    
    ISVNDirEntry entry;
    
    // directory
    entry = client.getDirEntry(new File(thisTest.getWCPath()+"/A"), SVNRevision.HEAD);
    assertNotNull(entry);
    assertEquals(SVNNodeKind.DIR, entry.getNodeKind());
    assertEquals(0, entry.getSize());
    assertEquals("A", entry.getPath());
    assertEquals(TEST_USER, entry.getLastCommitAuthor());
    assertNotNull(entry.getLastChangedDate());
    
    // file
    entry = client.getDirEntry(new File(thisTest.getWCPath()+"/A/mu"), SVNRevision.HEAD);
    assertNotNull(entry);
    assertEquals(SVNNodeKind.FILE, entry.getNodeKind());
    assertEquals(new File(thisTest.getWCPath()+"/A/mu").length(), entry.getSize());
    assertEquals("mu", entry.getPath());
    assertEquals(TEST_USER, entry.getLastCommitAuthor());
    assertNotNull(entry.getLastChangedDate());
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:25,代码来源:LsTest.java


示例9: cleanUpRepo

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
private void cleanUpRepo() throws SVNClientException {
    ISVNClientAdapter client = getClient();
    ISVNDirEntry[] entries = client.getList(repoUrl, SVNRevision.HEAD, false);
    SVNUrl[] urls = new SVNUrl[entries.length];
    for (int i = 0; i < entries.length; i++) {
        urls[i] = repoUrl.appendPath(entries[i].getPath());            
    }        
    client.remove(urls, "cleanup");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:InteceptorTest.java


示例10: cleanUpRepo

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
protected void cleanUpRepo() throws SVNClientException, IOException, InterruptedException {
    ISVNClientAdapter client = getFullWorkingClient();
    ISVNDirEntry[] entries = client.getList(repoUrl, SVNRevision.HEAD, false);
    SVNUrl[] urls = new SVNUrl[entries.length];
    for (int i = 0; i < entries.length; i++) {
        urls[i] = repoUrl.appendPath(entries[i].getPath());            
    }        
    cliRemove(urls);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AbstractSvnTestCase.java


示例11: getDirEntry

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public ISVNDirEntry getDirEntry(SVNUrl url, SVNRevision revision)
	throws SVNClientException {
	
	// list give the DirEntrys of the elements of a directory or the DirEntry
	// of a file
	ISVNDirEntry[] entries = getList(url.getParent(), revision,false);
	String expectedPath = url.getLastPathSegment();
	for (int i = 0; i < entries.length;i++) {
		if (entries[i].getPath().equals(expectedPath)) {
			return entries[i];
		}
	}
	return null; // not found
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:15,代码来源:AbstractJhlClientAdapter.java


示例12: testBasicLsUrl

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public void testBasicLsUrl() throws Throwable {
    // create the working copy
    OneTest thisTest = new OneTest("basicLsUrl",getGreekTestConfig());
    
    ISVNDirEntry[] entries = client.getList(thisTest.getUrl(), SVNRevision.HEAD, true);
    thisTest.getExpectedRepository().check(entries,"", true);       
    
    // list directory A
    entries = client.getList(new SVNUrl(thisTest.getUrl()+"/A"), SVNRevision.HEAD, false);
    thisTest.getExpectedRepository().check(entries,"A", false);
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:12,代码来源:LsTest.java


示例13: testRemoveUrls

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public void testRemoveUrls() throws Throwable {
    // create the working copy
    OneTest thisTest = new OneTest("basicRemoveUrls",getGreekTestConfig());

    ISVNDirEntry[] entries = null;
    entries = client.getList(new SVNUrl(thisTest.getUrl()+"/A"), SVNRevision.HEAD, false);
    assertEquals(4, entries.length);
    
    // remove A/mi
    client.remove(new SVNUrl[] { new SVNUrl(thisTest.getUrl()+"/A/mu") },"A/mu removed");
    
    // list directory A
    entries = client.getList(new SVNUrl(thisTest.getUrl()+"/A"), SVNRevision.HEAD, false);
    assertEquals(3, entries.length);
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:16,代码来源:DeleteTest.java


示例14: check

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
/**
 * Check the result of a single file SVNClient.list call
 * @param tested            the result array
 * @param singleFilePath    the path to be checked
 * @throws Exception
 */
public void check(ISVNDirEntry[] tested, String singleFilePath) throws Exception
{
    Assert.assertEquals("not a single dir entry", 1, tested.length);
    Item item = (Item)items.get(singleFilePath);
    Assert.assertNotNull("not found in working copy", item);
    Assert.assertNotNull("not a file", item.myContent);
    Assert.assertEquals("state says file, working copy not",
            tested[0].getNodeKind(),
            item.nodeKind == SVNNodeKind.NONE ? SVNNodeKind.FILE : item.nodeKind);
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:17,代码来源:ExpectedWC.java


示例15: getList

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
private ISVNDirEntry[] getList(String target, SVNRevision rev, boolean recursive)
	throws SVNClientException {

	byte[] listXml;
	try {
		listXml = _cmd.list(target, toString(rev), recursive);	
		return CmdLineRemoteDirEntry.createDirEntries(listXml);
	} catch (CmdLineException e) {
		throw SVNClientException.wrapException(e);
	}
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:12,代码来源:CmdLineClientAdapter.java


示例16: getListWithLocks

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public ISVNDirEntryWithLock[] getListWithLocks(SVNUrl url,
		SVNRevision revision, SVNRevision pegRevision, boolean recurse)
		throws SVNClientException {
	ISVNDirEntry[] entries = getList(url, revision, pegRevision, recurse);
	ISVNDirEntryWithLock[] entriesWithLocks = new ISVNDirEntryWithLock[entries.length];
	for (int i = 0; i < entries.length; i++) {
		entriesWithLocks[i] = new CmdLineRemoteDirEntryWithLock(entries[i], null);
	}
	return entriesWithLocks;
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:11,代码来源:CmdLineClientAdapter.java


示例17: getDirEntry

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public ISVNDirEntry getDirEntry(SVNUrl url, SVNRevision revision)
	throws SVNClientException {
	
	// list give the DirEntrys of the elements of a directory or the DirEntry
	// of a file
	ISVNDirEntry[] entries = getList(url.getParent(),revision,false);
	
	String expectedPath = url.getLastPathSegment();
	for (int i = 0; i < entries.length;i++) {
		if (entries[i].getPath().equals(expectedPath)) {
			return entries[i];
		}
	}
	return null; // not found
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:16,代码来源:CmdLineClientAdapter.java


示例18: getDirEntry

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public ISVNDirEntry getDirEntry(SVNUrl url, SVNRevision revision)
		throws SVNClientException {

	// list give the DirEntrys of the elements of a directory or the
	// DirEntry
	// of a file
	ISVNDirEntry[] entries = getList(url.getParent(), revision, false);
	String expectedPath = url.getLastPathSegment();
	for (int i = 0; i < entries.length; i++) {
		if (entries[i].getPath().equals(expectedPath)) {
			return entries[i];
		}
	}
	return null; // not found
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:16,代码来源:AbstractJhlClientAdapter.java


示例19: getEntryAttributes

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
public ISVNDirEntry[] getEntryAttributes() {            
    return entries != null ? entries.toArray(new ISVNDirEntry[entries.size()]) : new ISVNDirEntry[] {} ;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:ListCommand.java


示例20: getList

import org.tigris.subversion.svnclientadapter.ISVNDirEntry; //导入依赖的package包/类
@Override
public ISVNDirEntry[] getList(SVNUrl url, SVNRevision revision, boolean recursivelly) throws SVNClientException {
    ListCommand cmd = new ListCommand(url, revision, recursivelly);
    exec(cmd);
    return cmd.getEntries();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:CommandlineClient.java



注:本文中的org.tigris.subversion.svnclientadapter.ISVNDirEntry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ScaleInAnimator类代码示例发布时间:2022-05-22
下一篇:
Java RefreshHeader类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap