public void handleStatus(SVNStatus status) { if (absPath.equals(status.getFile())) { if (result[0] != null && result[0].getContentsStatus() == SVNStatusType.STATUS_EXTERNAL && absPath.isDirectory()) { result[0] = status; result[0].markExternal(); } else if (result[0] == null) { result[0] = status; } } } };
private void recordSkips(String mergeInfoPath, SVNEntry targetEntry, boolean isRollback) throws SVNException { int numberOfSkippedPaths = mySkippedPaths != null ? mySkippedPaths.size() : 0; if (numberOfSkippedPaths > 0) { Map merges = new TreeMap(); for (Iterator skippedPaths = mySkippedPaths.iterator(); skippedPaths.hasNext();) { File skippedPath = (File) skippedPaths.next(); SVNStatus status = SVNStatusUtil.getStatus(skippedPath, myWCAccess); if (status.getContentsStatus() == SVNStatusType.STATUS_NONE || status.getContentsStatus() == SVNStatusType.STATUS_UNVERSIONED) { continue; } merges.put(skippedPath, new SVNMergeRangeList(new SVNMergeRange[0])); } updateWCMergeInfo(null, myTarget, mergeInfoPath, targetEntry, merges, isRollback); } }
public void handleStatus(SVNStatus status) { if (absPath.equals(status.getFile())) { if (result[0] != null && result[0].getContentsStatus() == SVNStatusType.STATUS_EXTERNAL && absPath.isDirectory()) { result[0] = status; result[0].markExternal(); } else if (result[0] == null) { result[0] = status; } } } };
private void recordSkips(String mergeInfoPath, SVNEntry targetEntry, boolean isRollback) throws SVNException { int numberOfSkippedPaths = mySkippedPaths != null ? mySkippedPaths.size() : 0; if (numberOfSkippedPaths > 0) { Map merges = new TreeMap(); for (Iterator skippedPaths = mySkippedPaths.iterator(); skippedPaths.hasNext();) { File skippedPath = (File) skippedPaths.next(); SVNStatus status = SVNStatusUtil.getStatus(skippedPath, myWCAccess); if (status.getContentsStatus() == SVNStatusType.STATUS_NONE || status.getContentsStatus() == SVNStatusType.STATUS_UNVERSIONED) { continue; } merges.put(skippedPath, new SVNMergeRangeList(new SVNMergeRange[0])); } updateWCMergeInfo(myTarget, mergeInfoPath, targetEntry, merges, isRollback); } }
public void handleStatus(SVNStatus status) { if (absPath.equals(status.getFile())) { if (result[0] != null && result[0].getContentsStatus() == SVNStatusType.STATUS_EXTERNAL && absPath.isDirectory()) { result[0] = status; result[0].markExternal(); } else if (result[0] == null) { result[0] = status; } } } };
public void handleStatus(SVNStatus status) { if (absPath.equals(status.getFile())) { if (result[0] != null && result[0].getContentsStatus() == SVNStatusType.STATUS_EXTERNAL && absPath.isDirectory()) { result[0] = status; result[0].markExternal(); } else if (result[0] == null) { result[0] = status; } } } };
public static List<File> listModifiedFiles(File path, SVNRevision revision) throws SVNException { SVNClientManager svnClientManager = SVNClientManager.newInstance(); final List<File> fileList = new ArrayList<File>(); svnClientManager.getStatusClient().doStatus(path, revision, SVNDepth.INFINITY, false, false, false, false, new ISVNStatusHandler() { @Override public void handleStatus(SVNStatus status) throws SVNException { SVNStatusType statusType = status.getContentsStatus(); if (statusType != SVNStatusType.STATUS_NONE && statusType != SVNStatusType.STATUS_NORMAL && statusType != SVNStatusType.STATUS_IGNORED) { fileList.add(status.getFile()); } } }, null); return fileList; }
public void handleStatus(SVNStatus status) throws SVNException { SVNStatusType s = status.getContentsStatus(); if (s == SVNStatusType.STATUS_UNVERSIONED || s == SVNStatusType.STATUS_IGNORED || s == SVNStatusType.STATUS_MODIFIED) { listener.getLogger().println("Deleting "+status.getFile()); try { File f = status.getFile(); if (f.isDirectory()) FileUtils.deleteDirectory(f); else f.delete(); } catch (IOException e) { throw new SVNException(SVNErrorMessage.UNKNOWN_ERROR_MESSAGE,e); } } } }, null);
public void handleStatus(SVNStatus status) throws SVNException { String relativePath = FileUtil.getPathRelativeToBase(status.getFile(), baseDirAbsolutePath); if (status.getContentsStatus().getID() == SVNStatusType.STATUS_NONE.getID() || status.getContentsStatus().getID() == SVNStatusType.STATUS_UNVERSIONED.getID()) { map.put(relativePath, Boolean.FALSE); } else { map.put(relativePath, Boolean.TRUE); } } }
public void handleStatus(SVNStatus status) throws SVNException { String relativePath = FileUtil.getPathRelativeToBase(status.getFile(), baseDirAbsolutePath); if (status.getContentsStatus().getID() == SVNStatusType.STATUS_NONE.getID() || status.getContentsStatus().getID() == SVNStatusType.STATUS_UNVERSIONED.getID()) { map.put(relativePath, Boolean.FALSE); } else { map.put(relativePath, Boolean.TRUE); } } }
public void handleStatus(SVNStatus status) throws SVNException { if (status.getContentsStatus() == SVNStatusType.STATUS_OBSTRUCTED) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "''{0}'' is in the way of the resource actually under version control", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } else if (status.getEntry() == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNVERSIONED_RESOURCE, "''{0}'' is not under version control", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } else if ((status.getContentsStatus() != SVNStatusType.STATUS_NORMAL && status.getContentsStatus() != SVNStatusType.STATUS_DELETED && status.getContentsStatus() != SVNStatusType.STATUS_MISSING) || (status.getPropertiesStatus() != SVNStatusType.STATUS_NONE && status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MODIFIED, "''{0}'' has local modifications", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } } }, null);
public void handleStatus(SVNStatus status) throws SVNException { if (status.getContentsStatus() == SVNStatusType.STATUS_OBSTRUCTED) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "''{0}'' is in the way of the resource actually under version control", status.getFile()); SVNErrorManager.error(err); } else if (status.getEntry() == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNVERSIONED_RESOURCE, "''{0}'' is not under version control", status.getFile()); SVNErrorManager.error(err); } else if ((status.getContentsStatus() != SVNStatusType.STATUS_NORMAL && status.getContentsStatus() != SVNStatusType.STATUS_DELETED && status.getContentsStatus() != SVNStatusType.STATUS_MISSING) || (status.getPropertiesStatus() != SVNStatusType.STATUS_NONE && status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MODIFIED, "''{0}'' has local modifications", status.getFile()); SVNErrorManager.error(err); } } });
public void handleStatus(SVNStatus status) throws SVNException { if (status.getContentsStatus() == SVNStatusType.STATUS_OBSTRUCTED) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "''{0}'' is in the way of the resource actually under version control", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } else if (status.getEntry() == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNVERSIONED_RESOURCE, "''{0}'' is not under version control", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } else if ((status.getContentsStatus() != SVNStatusType.STATUS_NORMAL && status.getContentsStatus() != SVNStatusType.STATUS_DELETED && status.getContentsStatus() != SVNStatusType.STATUS_MISSING) || (status.getPropertiesStatus() != SVNStatusType.STATUS_NONE && status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MODIFIED, "''{0}'' has local modifications", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } } }, null);
public void handleStatus(SVNStatus status) throws SVNException { if (status.getContentsStatus() == SVNStatusType.STATUS_OBSTRUCTED) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.NODE_UNEXPECTED_KIND, "''{0}'' is in the way of the resource actually under version control", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } else if (status.getEntry() == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNVERSIONED_RESOURCE, "''{0}'' is not under version control", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } else if ((status.getContentsStatus() != SVNStatusType.STATUS_NORMAL && status.getContentsStatus() != SVNStatusType.STATUS_DELETED && status.getContentsStatus() != SVNStatusType.STATUS_MISSING) || (status.getPropertiesStatus() != SVNStatusType.STATUS_NONE && status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MODIFIED, "''{0}'' has local modifications", status.getFile()); SVNErrorManager.error(err, SVNLogType.WC); } } }, null);
public SVNStatusType getCombinedNodeAndContentsStatus() { int workingCopyFormat = getWorkingCopyFormat(); SVNStatusType nodeStatus = getNodeStatus(); SVNStatusType contentsStatus = getContentsStatus(); boolean versioned = isVersioned(); boolean conflicted = isConflicted(); return combineNodeAndContentsStatus(workingCopyFormat, nodeStatus, contentsStatus, versioned, conflicted); }
public void handleStatus(SVNStatus status) throws SVNException { SVNEntry entry = status.getEntry(); if (entry == null) { return; } if (status.getContentsStatus() != SVNStatusType.STATUS_ADDED) { long itemRev = committed ? entry.getCommittedRevision() : entry.getRevision(); if (!SVNRevision.isValidRevisionNumber(minRev[0]) || itemRev < minRev[0]) { minRev[0] = itemRev; } if (!SVNRevision.isValidRevisionNumber(maxRev[0]) || itemRev > maxRev[0]) { maxRev[0] = itemRev; } } isSwitched[0] |= status.isSwitched(); isModified[0] |= status.getContentsStatus() != SVNStatusType.STATUS_NORMAL; isModified[0] |= status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL && status.getPropertiesStatus() != SVNStatusType.STATUS_NONE; isSparseCheckOut[0] |= entry.getDepth() != SVNDepth.INFINITY; if (wcPath != null && wcURL[0] == null && wcPath.equals(status.getFile())) { wcURL[0] = entry.getSVNURL(); } } });
public void handleStatus(SVNStatus status) { if (status.getEntryProperties() == null || status.getEntryProperties().isEmpty()) { return; } if (status.getContentsStatus() != SVNStatusType.STATUS_ADDED) { SVNRevision revision = status.getRevision(); if (revision != null) { if (minRevision[0] < 0 || minRevision[0] > revision.getNumber()) { minRevision[0] = revision.getNumber(); } maxRevision[0] = Math.max(maxRevision[0], revision.getNumber()); } } switched[0] |= status.isSwitched(); switched[1] |= status.getContentsStatus() != SVNStatusType.STATUS_NORMAL; switched[1] |= status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL && status.getPropertiesStatus() != SVNStatusType.STATUS_NONE; if (wcURL[0] == null && status.getFile() != null && status.getFile().equals(path) && status.getURL() != null) { wcURL[0] = status.getURL().toString(); } } });
public void handleStatus(SVNStatus status) { if (status.getEntryProperties() == null || status.getEntryProperties().isEmpty()) { return; } if (status.getContentsStatus() != SVNStatusType.STATUS_ADDED) { SVNRevision revision = committed ? status.getCommittedRevision() : status.getRevision(); if (revision != null) { if (minRevision[0] < 0 || minRevision[0] > revision.getNumber()) { minRevision[0] = revision.getNumber(); } maxRevision[0] = Math.max(maxRevision[0], revision.getNumber()); } } switched[0] |= status.isSwitched(); switched[1] |= status.getContentsStatus() != SVNStatusType.STATUS_NORMAL; switched[1] |= status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL && status.getPropertiesStatus() != SVNStatusType.STATUS_NONE; switched[2] |= status.getEntry() != null && status.getEntry().getDepth() != SVNDepth.INFINITY; if (wcURL[0] == null && status.getFile() != null && status.getFile().equals(path) && status.getURL() != null) { wcURL[0] = status.getURL().toString(); } } }, null);
public void handleStatus(SVNStatus status) { if (status.getEntryProperties() == null || status.getEntryProperties().isEmpty()) { return; } if (status.getContentsStatus() != SVNStatusType.STATUS_ADDED) { SVNRevision revision = committed ? status.getCommittedRevision() : status.getRevision(); if (revision != null) { if (minRevision[0] < 0 || minRevision[0] > revision.getNumber()) { minRevision[0] = revision.getNumber(); } maxRevision[0] = Math.max(maxRevision[0], revision.getNumber()); } } switched[0] |= status.isSwitched(); switched[1] |= status.getContentsStatus() != SVNStatusType.STATUS_NORMAL; switched[1] |= status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL && status.getPropertiesStatus() != SVNStatusType.STATUS_NONE; switched[2] |= status.getEntry() != null && status.getEntry().getDepth() != SVNDepth.INFINITY; if (wcURL[0] == null && status.getFile() != null && status.getFile().equals(path) && status.getURL() != null) { wcURL[0] = status.getURL().toString(); } } }, null);
public void handleStatus(SVNStatus status) { if (status.getEntryProperties() == null || status.getEntryProperties().isEmpty()) { return; } if (status.getContentsStatus() != SVNStatusType.STATUS_ADDED && !status.isFileExternal()) { SVNRevision revision = getOperation().isCommitted() ? status.getCommittedRevision() : status.getRevision(); if (revision != null) { if (minRevision[0] < 0 || minRevision[0] > revision.getNumber()) { minRevision[0] = revision.getNumber(); } maxRevision[0] = Math.max(maxRevision[0], revision.getNumber()); } } switched[0] |= status.isSwitched(); switched[1] |= status.getContentsStatus() != SVNStatusType.STATUS_NORMAL; switched[1] |= status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL && status.getPropertiesStatus() != SVNStatusType.STATUS_NONE; switched[2] |= status.getEntry() != null && status.getEntry().getDepth() != SVNDepth.INFINITY; if (wcURL[0] == null && status.getFile() != null && status.getFile().equals(getFirstTarget()) && status.getURL() != null) { wcURL[0] = status.getURL().toString(); } } }, null);