当前位置: 首页>>代码示例>>Java>>正文


Java SVNStatusKind类代码示例

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


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

示例1: testPropertySetNonRecursivelly

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void testPropertySetNonRecursivelly() throws Exception {                                                
    File folder = createFolder("folder");        
    File file = createFolder(folder, "file");        
    File folder1 = createFolder(folder, "folder1");        
    File file1 = createFolder(folder1, "file1");        
    
    add(folder);
    add(file);
    add(folder1);
    add(file1);
    commit(getWC());
    
    ISVNClientAdapter c = getNbClient();        
    c.propertySet(folder, "p1", "v1", false);
    assertNotifiedFiles(folder);
    
    assertPropertyStatus(SVNStatusKind.MODIFIED, folder);
    assertPropertyStatus(SVNStatusKind.NONE, file);
    assertPropertyStatus(SVNStatusKind.NONE, folder1);
    assertPropertyStatus(SVNStatusKind.NONE, file1);
    
    assertProperty(c, folder, "p1", "v1");        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:PropertyTestHidden.java

示例2: testCommitFile

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
private void testCommitFile(String path) throws Exception {
    createAndCommitParentFolders(path);
    File file = createFile(path);

    add(file);
    assertStatus(SVNStatusKind.ADDED, file);

    SVNRevision revisionBefore = (SVNRevision.Number) getRevision(getRepoUrl());

    ISVNClientAdapter client = getNbClient();

    long r = client.commit(new File[] {file}, "commit", true);

    SVNRevision revisionAfter = (SVNRevision.Number) getRevision(getRepoUrl());

    assertTrue(file.exists());
    assertStatus(SVNStatusKind.NORMAL, file);
    assertNotSame(revisionBefore, revisionAfter);
    assertEquals(((SVNRevision.Number)revisionAfter).getNumber(), r);
    assertNotifiedFiles(file);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:CommitTestHidden.java

示例3: testAddNoDirectory

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void testAddNoDirectory() throws Exception {
    File file = new File(getWC(), "fail");

    assertStatus(SVNStatusKind.NONE, file);

    SVNClientException e = null;
    try {
        ISVNClientAdapter c = getNbClient();
        c.addDirectory(file, false);
    } catch (SVNClientException ex) {
        e = ex;
    }
    if (isJavahl()) {
        assertNotNull(e);
        assertTrue(e.getMessage().indexOf("is not a working copy") > -1 || e.getMessage().indexOf("not found") > -1);
    }

    assertNotifiedFiles(new File[] {});
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:AddTestHidden.java

示例4: testMoveFile2File

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
private void testMoveFile2File(String srcPath, String targetFileName) throws Exception {
    createAndCommitParentFolders(srcPath);
    File file = createFile(srcPath);
    add(file);
    commit(file);
            
    File filemove = new File(getWC(), renameFile(srcPath, targetFileName));
    
    ISVNClientAdapter c = getNbClient();
    c.move(file, filemove, true);

    assertTrue(filemove.exists());
    assertStatus(SVNStatusKind.ADDED, filemove);
    if (isSvnkit()) {
        // no notification about target, instead "Copying    target_path" comes into logMessage()
        assertNotifiedFiles(new File[] {file});
    } else {
        assertNotifiedFiles(new File[] {file, filemove});
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:MoveTestHidden.java

示例5: Setup

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
/**
 * Local file vs HEAD
 * @param baseFile
 * @param status remote status of the file
 */
public Setup(File baseFile, ISVNStatus status) {
    this.baseFile = baseFile;
    this.propertyName = null;
    this.secondRevision = null;
    title = baseFile.getName();
    String headTitle;
    ResourceBundle loc = NbBundle.getBundle(Setup.class);
    if (status.getRepositoryTextStatus().equals(SVNStatusKind.ADDED)) {
                firstRevision = REVISION_HEAD;
                headTitle = loc.getString("MSG_DiffPanel_RemoteNew");
            } else if (status.getRepositoryTextStatus().equals(SVNStatusKind.DELETED)) {
                firstRevision = null;
                headTitle = loc.getString("MSG_DiffPanel_RemoteDeleted");
            } else if (status.getRepositoryTextStatus().equals(SVNStatusKind.MODIFIED)) {
                firstRevision = REVISION_HEAD;
                headTitle = MessageFormat.format(loc.getString("MSG_DiffPanel_RemoteModified"), new Object [] { firstRevision });
            } else {
                firstRevision = REVISION_HEAD;
                headTitle = REVISION_HEAD.toString();
            }
    firstSource = new DiffStreamSource(baseFile, propertyName, REVISION_HEAD, headTitle);
    secondSource = new DiffStreamSource(baseFile, propertyName, REVISION_CURRENT, REVISION_CURRENT);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:Setup.java

示例6: modifyFileOnDemandLock

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void modifyFileOnDemandLock () throws Exception {
    // init
    File file = new File(wc, "file");
    file.createNewFile();
    commit(wc);
    getClient().propertySet(file, "svn:needs-lock", "true", false);
    commit(file);
    assertEquals(SVNStatusKind.NORMAL, getSVNStatus(file).getTextStatus());

    SvnModuleConfig.getDefault().setAutoLock(true);
    // modify
    OutputStream os = FileUtil.toFileObject(file).getOutputStream();
    os.write(new byte[] { 'a', 0 });
    os.close();

    // test
    assertTrue(file.exists());
    assertEquals(SVNStatusKind.MODIFIED, getSVNStatus(file).getTextStatus());

    assertCachedStatus(file, FileInformation.STATUS_VERSIONED_MODIFIEDLOCALLY_CONTENT | FileInformation.STATUS_LOCKED);

    commit(wc);

    assertEquals(SVNStatusKind.NORMAL, getSVNStatus(file).getTextStatus());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:InteceptorTest.java

示例7: deleteNotVersionedFile

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void deleteNotVersionedFile() throws Exception {
        // init        
        File file = new File(wc, "file");
        file.createNewFile();             
        assertEquals(SVNStatusKind.UNVERSIONED, getSVNStatus(file).getTextStatus());

        // delete
        delete(file);

        // test
        assertFalse(file.exists());
        assertEquals(SVNStatusKind.UNVERSIONED, getSVNStatus(file).getTextStatus());
        
        assertEquals(FileInformation.STATUS_UNKNOWN, getStatus(file));
        
//        commit(wc);
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:InteceptorTest.java

示例8: deleteVersionedFolder

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void deleteVersionedFolder() throws Exception {
    // init        
    File folder = new File(wc, "folder1");
    folder.mkdirs();
    commit(wc);      
    assertEquals(SVNStatusKind.NORMAL, getSVNStatus(folder).getTextStatus());

    // delete
    delete(folder);

    // test
    assertFalse(folder.exists());
    assertEquals(SVNStatusKind.DELETED, getSVNStatus(folder).getTextStatus());
    
    assertCachedStatus(folder, FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY);        
    
    commit(wc);
    
    assertFalse(folder.exists());
    assertEquals(SVNStatusKind.UNVERSIONED, getSVNStatus(folder).getTextStatus());        
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:InteceptorTest.java

示例9: deleteNotVersionedFolder

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void deleteNotVersionedFolder() throws IOException, SVNClientException {
        // init        
        File folder = new File(wc, "folder2");
        folder.mkdirs();
        assertEquals(SVNStatusKind.UNVERSIONED, getSVNStatus(folder).getTextStatus());

        // delete
        delete(folder);
        
        // test
        assertFalse(folder.exists());
        
        assertEquals(SVNStatusKind.UNVERSIONED, getSVNStatus(folder).getTextStatus());
        assertEquals(FileInformation.STATUS_UNKNOWN, getStatus(folder));
        
//        commit(wc);
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:InteceptorTest.java

示例10: testGetSingleStatusFileRemoved

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void testGetSingleStatusFileRemoved() throws Exception {
    File myFile = new File(dataRootDir + "/SvnWcParser/file-removed/testapp/ReadMe.txt");
    ISVNStatus parsedStatus = svnWcParser.getSingleStatus(myFile);
    assertFalse(parsedStatus.isCopied());
    assertEquals("svn://gonzo/testRepos/trunk/testApp/src/testapp/ReadMe.txt", parsedStatus.getUrl().toString());
    assertEquals(SVNStatusKind.DELETED, parsedStatus.getTextStatus());
    assertEquals(6, parsedStatus.getRevision().getNumber());
    assertNull(parsedStatus.getConflictNew());
    assertNull(parsedStatus.getConflictOld());
    assertNull(parsedStatus.getConflictWorking());
    assertEquals(myFile, parsedStatus.getFile());
    Date expectedDate = SvnWcUtils.parseSvnDate("2006-04-25T04:22:27.194329Z");
    assertEquals(expectedDate, parsedStatus.getLastChangedDate());
    assertEquals(6, parsedStatus.getLastChangedRevision().getNumber());
    assertEquals("ed", parsedStatus.getLastCommitAuthor());
    assertEquals(SVNNodeKind.FILE, parsedStatus.getNodeKind());
    assertEquals(myFile.getPath(), parsedStatus.getPath());
    assertEquals(SVNStatusKind.NONE, parsedStatus.getPropStatus());
    assertNull(parsedStatus.getLockComment());
    assertNull(parsedStatus.getLockOwner());
    assertNull(parsedStatus.getLockCreationDate());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:SvnWcParserTest.java

示例11: testGetSingleStatusFileUnknownAnywhereNewFormat

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
/**
 * Tests a specific case... where the file doesn't exist, and there is no entry in the SVN
 * files, but it's still being queried by the module.  Return unversioned.  Working copy is
 * the format as of SVN 1.4.0
 */
public void testGetSingleStatusFileUnknownAnywhereNewFormat() throws Exception {
    File myFile = new File(dataRootDir + "/SvnWcParser/new-format-no-changes/testapp/readme.txt");
    ISVNStatus parsedStatus = svnWcParser.getSingleStatus(myFile);
    assertFalse(parsedStatus.isCopied());
    assertEquals("svn://gonzo/testRepos/trunk/testApp/src/testapp/readme.txt", parsedStatus.getUrl().toString());
    assertEquals(SVNStatusKind.UNVERSIONED, parsedStatus.getTextStatus());
    assertEquals(0, parsedStatus.getRevision().getNumber());
    assertNull(parsedStatus.getConflictNew());
    assertNull(parsedStatus.getConflictOld());
    assertNull(parsedStatus.getConflictWorking());
    assertEquals(myFile, parsedStatus.getFile());
    assertNull(parsedStatus.getLastChangedDate());
    assertEquals(0, parsedStatus.getLastChangedRevision().getNumber());
    assertNull(parsedStatus.getLastCommitAuthor());
    assertEquals(SVNNodeKind.UNKNOWN, parsedStatus.getNodeKind());
    assertEquals(myFile.getPath(), parsedStatus.getPath());
    assertEquals(SVNStatusKind.UNVERSIONED, parsedStatus.getPropStatus());
    assertNull(parsedStatus.getLockComment());
    assertNull(parsedStatus.getLockOwner());
    assertNull(parsedStatus.getLockCreationDate());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:SvnWcParserTest.java

示例12: deleteA_CreateA

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void deleteA_CreateA() throws IOException, SVNClientException {
    
    // init
    File fileA = new File(wc, "A");
    fileA.createNewFile();        
    commit(wc);        
    assertEquals(SVNStatusKind.NORMAL, getSVNStatus(fileA).getTextStatus());        
    
    // delete                
    FileObject fo = FileUtil.toFileObject(fileA);
    fo.delete();

    // test if deleted
    assertFalse(fileA.exists());
    assertEquals(SVNStatusKind.DELETED, getSVNStatus(fileA).getTextStatus());

    // create        
    fo.getParent().createData(fo.getName());       
    
    // test 
    assertTrue(fileA.exists());
    
    assertEquals(SVNStatusKind.NORMAL, getSVNStatus(fileA).getTextStatus());        
    assertEquals(FileInformation.STATUS_VERSIONED_UPTODATE, getStatus(fileA));                
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:InteceptorTest.java

示例13: deleteA_CreateA_RunAtomic

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void deleteA_CreateA_RunAtomic() throws IOException, SVNClientException {
    // init
    final File fileA = new File(wc, "A");
    fileA.createNewFile();        
    commit(wc);        
    assertEquals(SVNStatusKind.NORMAL, getSVNStatus(fileA).getTextStatus());        
    
    final FileObject fo = FileUtil.toFileObject(fileA);
    AtomicAction a = new AtomicAction() {
        public void run() throws IOException {             
            fo.delete();
            fo.getParent().createData(fo.getName());
        }
    };
    fo.getFileSystem().runAtomicAction(a);        
    
    waitALittleBit(500); // after create 
    
    // test 
    assertTrue(fileA.exists());        
    assertEquals(SVNStatusKind.NORMAL, getSVNStatus(fileA).getTextStatus());        
    assertEquals(FileInformation.STATUS_VERSIONED_UPTODATE, getStatus(fileA));                
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:InteceptorTest.java

示例14: renameVersionedFile_DO

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void renameVersionedFile_DO() throws Exception {
        // init
        File fromFile = new File(wc, "fromFile");
        fromFile.createNewFile();
        commit(wc);                       
        File toFile = new File(wc, "toFile");
        
        // rename    
        renameDO(fromFile, toFile);
        
        // test 
        assertFalse(fromFile.exists());
        assertTrue(toFile.exists());
        
        assertEquals(SVNStatusKind.DELETED, getSVNStatus(fromFile).getTextStatus());
        assertEquals(SVNStatusKind.ADDED, getSVNStatus(toFile).getTextStatus());
        
        assertCachedStatus(fromFile, FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY);
        assertCachedStatus(toFile, FileInformation.STATUS_VERSIONED_ADDEDLOCALLY);
        
//        commit(wc);
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:InteceptorTest.java

示例15: testGetSingleStatusFileConflict

import org.tigris.subversion.svnclientadapter.SVNStatusKind; //导入依赖的package包/类
public void testGetSingleStatusFileConflict() throws Exception {
    File myFile = new File(dataRootDir + "/SvnWcParser/file-conflicts/testapp/ReadMe.txt");
    ISVNStatus parsedStatus = svnWcParser.getSingleStatus(myFile);
    assertFalse(parsedStatus.isCopied());
    assertEquals("svn://gonzo/testRepos/trunk/testApp/src/testapp/ReadMe.txt", parsedStatus.getUrl().toString());
    assertEquals(SVNStatusKind.CONFLICTED, parsedStatus.getTextStatus());
    assertEquals(5, parsedStatus.getRevision().getNumber());
    assertEquals(5, parsedStatus.getLastChangedRevision().getNumber());
    assertNotNull(parsedStatus.getConflictNew());
    assertNotNull(parsedStatus.getConflictOld());
    assertNotNull(parsedStatus.getConflictWorking());
    assertEquals(myFile, parsedStatus.getFile());
    Date expectedDate = SvnWcUtils.parseSvnDate("2006-04-25T04:12:27.726955Z");
    assertEquals(expectedDate, parsedStatus.getLastChangedDate());
    assertEquals(5, parsedStatus.getLastChangedRevision().getNumber());
    assertEquals("ed", parsedStatus.getLastCommitAuthor());
    assertEquals(SVNNodeKind.FILE, parsedStatus.getNodeKind());
    assertEquals(myFile.getPath(), parsedStatus.getPath());
    assertEquals(SVNStatusKind.NORMAL, parsedStatus.getPropStatus());
    assertNull(parsedStatus.getLockComment());
    assertNull(parsedStatus.getLockOwner());
    assertNull(parsedStatus.getLockCreationDate());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:SvnWcParserTest.java


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