Search in sources :

Example 1 with GetInfoCommand

use of org.tigris.subversion.subclipse.core.commands.GetInfoCommand in project subclipse by subclipse.

the class StatusCacheManager method getResourceRevision.

/**
 * The cached statuses do not provide revision numbers anymore. This method is the only place how
 * to query for the revision of the resource explicitely.
 *
 * @param resource
 * @return
 * @throws SVNException
 */
public SVNRevision getResourceRevision(ISVNLocalResource resource) throws SVNException {
    if (resource == null)
        return null;
    GetInfoCommand command = new GetInfoCommand(resource);
    command.run(null);
    final ISVNInfo info = command.getInfo();
    return (info != null) ? info.getRevision() : null;
}
Also used : GetInfoCommand(org.tigris.subversion.subclipse.core.commands.GetInfoCommand) ISVNInfo(org.tigris.subversion.svnclientadapter.ISVNInfo)

Aggregations

GetInfoCommand (org.tigris.subversion.subclipse.core.commands.GetInfoCommand)1 ISVNInfo (org.tigris.subversion.svnclientadapter.ISVNInfo)1