Search in sources :

Example 1 with SVNStatusUnversioned

use of org.tigris.subversion.svnclientadapter.SVNStatusUnversioned in project subclipse by subclipse.

the class StatusCacheManager method basicGetStatus.

/**
 * Get the statuse(s) from the svn meta files
 *
 * @param resource
 * @param strategy
 * @return
 * @throws SVNException
 */
private LocalResourceStatus basicGetStatus(IResource resource, StatusUpdateStrategy strategy) throws SVNException {
    if (!resource.exists())
        return LocalResourceStatus.NONE;
    LocalResourceStatus status = null;
    /* Code commented so that svn:externals that are multi-level deep will be
     * decorated.  In this scenario, there can be unversioned files in the middle
     * of the svn:externals files.                                               */
    // if (isAncestorNotManaged(resource)) {
    // // we know the resource is not managed because one of its ancestor is not managed
    // status = new LocalResourceStatus(new
    // SVNStatusUnversioned(resource.getLocation().toFile(),false));
    // } else {
    // we don't know if resource is managed or not, we must update its status
    strategy.setStatusCache(statusCache);
    setStatuses(resource, strategy.statusesToUpdate(resource));
    status = statusCache.getStatus(resource);
    if (status == null && resource != null && resource.getLocation() != null) {
        status = new LocalResourceStatus(new SVNStatusUnversioned(resource.getLocation().toFile(), false), null, checkForReadOnly);
    }
    return status;
}
Also used : SVNStatusUnversioned(org.tigris.subversion.svnclientadapter.SVNStatusUnversioned) LocalResourceStatus(org.tigris.subversion.subclipse.core.resources.LocalResourceStatus)

Example 2 with SVNStatusUnversioned

use of org.tigris.subversion.svnclientadapter.SVNStatusUnversioned in project subclipse by subclipse.

the class StatusUpdateStrategy method processUnversionedFolder.

void processUnversionedFolder(final File folder, final List<ISVNStatus> statuses, final boolean recursive, final Set<String> alreadyProcessed) {
    String absolutePath = folder.getAbsolutePath();
    if (alreadyProcessed.contains(absolutePath))
        return;
    alreadyProcessed.add(absolutePath);
    File[] files = folder.listFiles();
    if (files == null)
        return;
    for (File file : files) {
        statuses.add(new SVNStatusUnversioned(file, false));
        if (recursive && file.isDirectory()) {
            processUnversionedFolder(file, statuses, recursive, alreadyProcessed);
            continue;
        }
    }
}
Also used : SVNStatusUnversioned(org.tigris.subversion.svnclientadapter.SVNStatusUnversioned) File(java.io.File)

Aggregations

SVNStatusUnversioned (org.tigris.subversion.svnclientadapter.SVNStatusUnversioned)2 File (java.io.File)1 LocalResourceStatus (org.tigris.subversion.subclipse.core.resources.LocalResourceStatus)1