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


Java ISVNStatus.getTextStatus方法代码示例

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


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

示例1: notifyChangedStatus

import org.tigris.subversion.svnclientadapter.ISVNStatus; //导入方法依赖的package包/类
private void notifyChangedStatus(File file, boolean rec, ISVNStatus[] oldStatuses) throws SVNClientException {
    Map<File, ISVNStatus> oldStatusMap = new HashMap<File, ISVNStatus>();
    for (ISVNStatus s : oldStatuses) {
        oldStatusMap.put(s.getFile(), s);
    }
    ISVNStatus[] newStatuses = getStatus(file, rec, true);
    for (ISVNStatus newStatus : newStatuses) {
        ISVNStatus oldStatus = oldStatusMap.get(newStatus.getFile());
        if( (oldStatus == null && newStatus != null) ||
             oldStatus.getTextStatus() != newStatus.getTextStatus() ||
             oldStatus.getPropStatus() != newStatus.getPropStatus())
        {
            notificationHandler.notifyListenersOfChange(newStatus.getPath()); /// onNotify(cmd.getAbsoluteFile(s.getFile().getAbsolutePath()), null);
        }
   }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:CommandlineClient.java

示例2: collectUnversionedFolders

import org.tigris.subversion.svnclientadapter.ISVNStatus; //导入方法依赖的package包/类
/**
 * Collect the content of unversioned folders.
 * @param statuses
 * @param recursive
 * @return
 */
protected ISVNStatus[] collectUnversionedFolders(ISVNStatus[] statuses, boolean recursive) {
	if (statuses == null) {
		return null;
	}
    List<ISVNStatus> processed = new ArrayList<ISVNStatus>();
    for (ISVNStatus status : statuses) {
    	processed.add(status);
    	if (status.getNodeKind() != SVNNodeKind.FILE && status.getTextStatus() == SVNStatusKind.UNVERSIONED) {
    		File folder = status.getFile();
    		if (!folder.isDirectory() && !folder.exists())
    			continue;
  			Set<String> alreadyProcessed = new HashSet<String>();
			processUnversionedFolder(folder, processed, recursive, alreadyProcessed);
    	}
    }

    return processed.toArray(new ISVNStatus[processed.size()]);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:25,代码来源:StatusUpdateStrategy.java

示例3: updateCache

import org.tigris.subversion.svnclientadapter.ISVNStatus; //导入方法依赖的package包/类
/**
 * update the cache using the given statuses
 * @param status
 * @param workspaceRoot
 */
public IResource updateCache(IResource resource, ISVNStatus status) {
	if (resource != null && status != null && status.getTextStatus() != null && !resource.exists() && status.getTextStatus().equals(SVNStatusKind.MISSING) && (status.getLastChangedRevision() == null || status.getLastChangedRevision().getNumber() == -1)) {
		statusCache.removeStatus(resource);
		return resource;
	}
	return statusCache.addStatus(resource, new LocalResourceStatus(status, getURL(status), checkForReadOnly));
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:13,代码来源:StatusCacheManager.java

示例4: collectRemoteStatuses

import org.tigris.subversion.svnclientadapter.ISVNStatus; //导入方法依赖的package包/类
private RemoteResourceStatus[] collectRemoteStatuses(ISVNStatus[] statuses, ISVNClientAdapter client, final IProgressMonitor monitor)
 {
 	monitor.beginTask("", statuses.length);
 	try {
 	RemoteResourceStatus[] result = new RemoteResourceStatus[statuses.length];

     Arrays.sort(statuses, new Comparator() {
public int compare(Object o1, Object o2) {
	return ((ISVNStatus) o1).getPath().compareTo(((ISVNStatus) o2).getPath());
}            	
     });

     for (int i = 0; i < statuses.length; i++) {
     	ISVNStatus status = statuses[i];
     	SVNStatusKind localTextStatus = status.getTextStatus();

     	if (SVNStatusKind.UNVERSIONED.equals(localTextStatus)
     			|| SVNStatusKind.ADDED.equals(localTextStatus)
     			|| SVNStatusKind.IGNORED.equals(localTextStatus)
     		)
     	{
     		if (SVNStatusKind.NONE.equals(status.getRepositoryTextStatus()))
     			result[i] = RemoteResourceStatus.NONE;
     		else
         		result[i] = new RemoteResourceStatus(statuses[i], getRevisionFor(statuses[i]));
     	}
     	else
     	{
     		result[i] = new RemoteResourceStatus(statuses[i], getRevisionFor(statuses[i]));
     	}
     	monitor.worked(1);
     }	
     
     return result;
 	} finally {
 		monitor.done();
 	}
 }
 
开发者ID:subclipse,项目名称:subclipse,代码行数:39,代码来源:StatusAndInfoCommand.java

示例5: WCVersionSummary

import org.tigris.subversion.svnclientadapter.ISVNStatus; //导入方法依赖的package包/类
/**
 * Fetch the summary status information for the given working copy path.
 * @param svnClient The svn client used to fetch the status.
 * @param wcPathFile The working copy path.
 * @throws SVNClientException Raised if there is a problem fetching working copy status.
 */
protected WCVersionSummary( ISVNStatus rootStatus, ISVNStatus[] statuses, File wcPathFile,
                boolean processUnversioned ) {
    this.reposURL = rootStatus.getUrl().toString();

    String[] pathSegs = rootStatus.getUrl().getPathSegments();
    StringBuffer pathBuffer = new StringBuffer();
    for( int i = 0; i < pathSegs.length; i++ ) {
        pathBuffer.append( '/' ).append( pathSegs[i] );
    }
    this.reposPath = pathBuffer.toString();

    for( int i = 0; i < statuses.length; i++ ) {
        ISVNStatus status = statuses[i];

        if( !SVNStatusUtils.isManaged( status ) && !processUnversioned ) {
            // Don't care about unversioned files
            continue;
        }

        if( !this.hasModified && ((status.getTextStatus() != SVNStatusKind.NORMAL && status.getTextStatus() != SVNStatusKind.IGNORED) || (status.getPropStatus() != SVNStatusKind.NORMAL && status.getPropStatus() != SVNStatusKind.NONE)) ) {
            this.hasModified = true;
        }

        if( SVNStatusUtils.isManaged( status ) ) {
            
            if( isExternal( rootStatus, status ) ) {
                // don't include externals for the calculation process
                continue;
            }
            
            SVNRevision.Number rev = status.getLastChangedRevision();
            long revNum = (rev != null) ? rev.getNumber() : 0;
            if( revNum > this.maxRevision ) {
                this.maxRevision = revNum;
            }

            if( revNum < this.minRevision ) {
                this.minRevision = revNum;
            }

            SVNRevision.Number comRev = status.getLastChangedRevision();
            long committedRev = (comRev != null) ? comRev.getNumber() : 0;
            if( committedRev > this.maxCommitted ) {
                this.maxCommitted = committedRev;
            }
        }
    }

    if( (this.minRevision > 0) && (this.minRevision != this.maxRevision) ) {
        this.hasMixed = true;
    }
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:59,代码来源:WcVersion.java

示例6: collectUnmanaged

import org.tigris.subversion.svnclientadapter.ISVNStatus; //导入方法依赖的package包/类
/**
 * Collect all unmanaged directories.
 * 
 * @param receiver     The Collection which will be extended. Not <code>null</code>.
 * @param basedir      The base directory of the FileSet/DirSet. Not <code>null</code>.
 * @param dir          The current directory to be handled. Not <code>null</code>.
 * @param skipfirst    <code>true</code> <=> This directory is explicitly selected, so it
 *                     shall not be considered an unmanaged version.
 */
private void collectUnmanaged( List<File> receiver, File basedir, File dir, boolean skipfirst ) {
    if( ! scanunmanaged ) {
        // if unwanted by the concrete implementation we don't collect unmmanaged entries
        // which is a speed improvement due to the reduction of svn client actions
        return;
    }
    try {
        // iterate through the parental hierarchy until we find a managed source or the base dir
        Stack<File> parents = new Stack<File>();
        ISVNStatus  status  = getClient().getSingleStatus( dir );
        while( (dir != null) && (! dir.equals( basedir )) ) {
            if( unmanageddirs == null ) {
                // no specific status has been set, so we're leaving if we've found
                // a managed resource
                if( SVNStatusUtils.isManaged( status ) ) {
                    break;
                }
            } else {
                if( status.getTextStatus() != unmanageddirs ) {
                    // un expected status which indicates, to stop here
                    break;
                }
            }
            parents.push( dir );
            dir     = dir.getParentFile();
            status  = getClient().getSingleStatus( dir );
        }
        
        // store all implied resources
        int count = skipfirst ? 1 : 0;
        while( parents.size() > count ) {
            File unmanaged = parents.pop();
            if( ! receiver.contains( unmanaged ) ) { 
                receiver.add( unmanaged );
            }
        }
        
    } catch( SVNClientException ex ) {
        throw ex( ex, MSG_FAILED_TO_CALCULATE_UNMANAGED );
    }
    
}
 
开发者ID:subclipse,项目名称:svnant,代码行数:52,代码来源:ResourceSetSvnCommand.java

示例7: hasRemote

import org.tigris.subversion.svnclientadapter.ISVNStatus; //导入方法依赖的package包/类
/**
 * Returns if the resource has a remote counter-part
 * @param status
 * 
 * @return has version in repository
 */
public static boolean hasRemote(ISVNStatus status) {
	SVNStatusKind textStatus = status.getTextStatus();
    return ((isManaged(textStatus)) && (!textStatus.equals(SVNStatusKind.ADDED) || status.isCopied()));
}
 
开发者ID:subclipse,项目名称:svnclientadapter,代码行数:11,代码来源:SVNStatusUtils.java


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