@Override public boolean fileExistsInVcs(FilePath path) { File file = path.getIOFile(); try { SVNStatus status = createStatusClient().doStatus(file, false); if (status != null) { if (svnStatusIs(status, SVNStatusType.STATUS_ADDED)) { return status.isCopied(); } return !(svnStatusIsUnversioned(status) || svnStatusIs(status, SVNStatusType.STATUS_IGNORED) || svnStatusIs(status, SVNStatusType.STATUS_OBSTRUCTED)); } } catch (SVNException e) { // } return false; }
/** * Method getStatus * * @param status * @return */ public static char[] getStatus(SVNStatus status) { char[] s = {' ', ' ', ' ', ' ', ' ', ' ', ' '}; // column 1 file status s[0] = status.getContentsStatus().getCode(); // column 2 folder status s[1] = status.getPropertiesStatus().getCode(); // column 3 lock status if (status.isLocked()) { s[2] = 'L'; } // column 4 copy status if (status.isCopied()) { s[3] = '+'; } // column 5 switched status if (status.isSwitched()) { s[4] = 'S'; } // column 6 local lock status if (status.getLocalLock() != null) { s[5] = 'K'; } // column 7 needs update if ((status.getRemotePropertiesStatus() != SVNStatusType.STATUS_NONE) || (status.getRemoteContentsStatus() != SVNStatusType.STATUS_NONE)) { s[6] = '*'; } return s; }