Search in sources :

Example 1 with SVNStatusType

use of org.tmatesoft.svn.core.wc.SVNStatusType in project MassBank-web by MassBank.

the class StatusHandler method handleStatus.

/*
	 * 
	 */
public void handleStatus(SVNStatus status) {
    File file = status.getFile();
    if (file.isDirectory()) {
        return;
    }
    String filePath = file.getPath();
    SVNStatusType statusType = null;
    statusType = status.getRemoteContentsStatus();
    if (statusType == SVNStatusType.STATUS_ADDED || statusType == SVNStatusType.STATUS_NONE || statusType == SVNStatusType.STATUS_DELETED) {
        String type = statusType.toString();
        this.updatedFileList.add(type + "=" + filePath);
        this.isModified = true;
        String dirName = File.separator + "molfile" + File.separator;
        if (filePath.indexOf(dirName) >= 0) {
            isMolUpdated = true;
        }
    }
}
Also used : SVNStatusType(org.tmatesoft.svn.core.wc.SVNStatusType) File(java.io.File)

Example 2 with SVNStatusType

use of org.tmatesoft.svn.core.wc.SVNStatusType in project GMM by Katharsas.

the class SvnPlugin method verifyExistingWorkingCopy.

private void verifyExistingWorkingCopy() {
    final SvnGetStatus ops = svnOperationFactory.createGetStatus();
    ops.setSingleTarget(workingCopy);
    ops.setReportAll(logger.isDebugEnabled());
    final Collection<SvnStatus> statuses = tryRun(ops, new ArrayList<>(SvnStatus.class));
    for (final SvnStatus entry : statuses) {
        final SVNStatusType type = entry.getNodeStatus();
        final String filePath = entry.getPath().getPath();
        if (type != SVNStatusType.STATUS_NORMAL) {
            logger.error("Existing working copy is in an invalid state (maybe modified)! " + "Pls fix manually or delete working copy at '" + workingCopy + "'.");
            throw new ConfigurationException("Found entry with invalid status in working copy! " + "Relative path: '" + filePath + "'. Status: '" + type + "'.");
        }
    }
}
Also used : SvnGetStatus(org.tmatesoft.svn.core.wc2.SvnGetStatus) ConfigurationException(gmm.ConfigurationException) SVNStatusType(org.tmatesoft.svn.core.wc.SVNStatusType) SvnStatus(org.tmatesoft.svn.core.wc2.SvnStatus)

Aggregations

SVNStatusType (org.tmatesoft.svn.core.wc.SVNStatusType)2 ConfigurationException (gmm.ConfigurationException)1 File (java.io.File)1 SvnGetStatus (org.tmatesoft.svn.core.wc2.SvnGetStatus)1 SvnStatus (org.tmatesoft.svn.core.wc2.SvnStatus)1