private String checkout(SvnOperationFactory svnOperationFactory) throws SVNException { logger.debug("Checking out " + getUri() + " to: " + getWorkingDirectory().getAbsolutePath()); final SvnCheckout checkout = svnOperationFactory.createCheckout(); checkout.setSource(SvnTarget.fromURL(SVNURL.parseURIEncoded(getUri()))); checkout.setSingleTarget(SvnTarget.fromFile(getWorkingDirectory())); Long id = checkout.run(); if (id == null) { return null; } return id.toString(); }
private void fixError(String path, SVNException e, SVNNodeKind kind) throws SVNException { SVNErrorMessage err = e.getErrorMessage(); if (err.getErrorCode() == SVNErrorCode.FS_NOT_FOUND || err.getErrorCode() == SVNErrorCode.RA_DAV_PATH_NOT_FOUND) { err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_UP_TO_DATE, kind == SVNNodeKind.DIR ? "Directory ''{0}'' is out of date" : "File ''{0}'' is out of date", path); throw new SVNException(err); } throw e; }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { if (SVNProperty.isWorkingCopyProperty(name)) { return; } else if (SVNProperty.isRegularProperty(name)) { currentEntry.hasPropChange = true; if (currentEntry.propChanges == null) { currentEntry.propChanges = new SVNProperties(); } currentEntry.propChanges.put(name, value); } currentEntry.changePropertyCalled = true; }
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException { handler.handleDirEntry(new SVNDirEntry(url.appendPath(dirEntry.getName(), false), dirEntry.getName(), dirEntry.getKind(), dirEntry.getSize(), dirEntry.hasProperties(), dirEntry.getRevision(), dirEntry.getDate(), dirEntry.getAuthor())); } };
/** * @return exception occurred * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }
private static void handleLeftLocalModificationsError(SVNException originalError) throws SVNException { SVNException error = null; for (error = originalError; error != null;) { if (error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { break; } error = (error.getCause() instanceof SVNException) ? (SVNException) error.getCause() : null; } if (error != null) { return; } throw originalError; }
public static void categorizeProperties(SVNProperties props, SVNProperties regular, SVNProperties entry, SVNProperties working) { for (String name : props.nameSet()) { SVNPropertyValue pv = props.getSVNPropertyValue(name); if (SVNProperty.isEntryProperty(name) && entry != null) { entry.put(name, pv); } else if (SVNProperty.isRegularProperty(name) && regular != null) { regular.put(name, pv); } else if (SVNProperty.isWorkingCopyProperty(name) && working != null) { working.put(name, pv); } } }
public boolean isEnoent() { SVNErrorCode errorCode = getErrorMessage().getErrorCode(); return errorCode == SVNErrorCode.ENTRY_NOT_FOUND || errorCode == SVNErrorCode.FS_NOT_FOUND || errorCode == SVNErrorCode.FS_NOT_OPEN || errorCode == SVNErrorCode.FS_NOT_FILE; } }
public void changeFileProperty(String path, String propertyName, SVNPropertyValue propertyValue) throws SVNException { FileBaton fb = fileBaton; if (fb.skip) { return; } if (SVNProperty.isWorkingCopyProperty(propertyName)) { return; } else if (SVNProperty.isRegularProperty(propertyName)) { fb.hasPropChanges = true; } fb.propChanges.put(propertyName, propertyValue); }
public SVNMergeRangeList mergeRevision(long revision) { if (getSize() > 0 && getRanges()[getSize() - 1].getEndRevision() == revision - 1) { getRanges()[getSize() - 1].setEndRevision(revision); return this; } pushRange(revision -1 , revision, true); return this; } }
public char[] readPassphrase(String realm, SVNProperties authParameters) { return SVNPropertyValue.getPropertyAsChars(authParameters.getSVNPropertyValue("passphrase")); } }
private void fixError(String path, SVNException e, SVNNodeKind kind) throws SVNException { SVNErrorMessage err = e.getErrorMessage(); if (err.getErrorCode() == SVNErrorCode.FS_NOT_FOUND || err.getErrorCode() == SVNErrorCode.RA_DAV_PATH_NOT_FOUND) { err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_UP_TO_DATE, kind == SVNNodeKind.DIR ? "Directory ''{0}'' is out of date" : "File ''{0}'' is out of date", path); throw new SVNException(err); } throw e; }
/** * @return exception occurred * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }
private void handleLeftLocalModificationsError(SVNException originalError) throws SVNException { SVNException error = null; for (error = originalError; error != null;) { if (error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { break; } error = (error.getCause() instanceof SVNException) ? (SVNException) error.getCause() : null; } if (error != null) { return; } throw originalError; }
public void changeFileProperty(String path, String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (SVNProperty.isWorkingCopyProperty(propertyName)) { return; } else if (SVNProperty.isRegularProperty(propertyName)) { currentEntry.hasPropChange = true; if (currentEntry.propChanges == null) { currentEntry.propChanges = new SVNProperties(); } currentEntry.propChanges.put(propertyName, propertyValue); } }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { if (dirBaton.skip) { return; } if (SVNProperty.isWorkingCopyProperty(name)) { return; } else if (SVNProperty.isRegularProperty(name)) { dirBaton.hasPropChange = true; } dirBaton.propChanges.put(name, value); }
public char[] readPassword(String realm, String userName, SVNProperties authParameters) { final SVNPropertyValue value = authParameters.getSVNPropertyValue("password"); return SVNPropertyValue.getPropertyAsChars(value); }
private void fixError(String path, SVNException e, SVNNodeKind kind) throws SVNException { SVNErrorMessage err = e.getErrorMessage(); if (err.getErrorCode() == SVNErrorCode.FS_NOT_FOUND || err.getErrorCode() == SVNErrorCode.RA_DAV_PATH_NOT_FOUND) { err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_UP_TO_DATE, kind == SVNNodeKind.DIR ? "Directory ''{0}'' is out of date" : "File ''{0}'' is out of date", path); throw new SVNException(err); } throw e; }
/** * @return exception occurred * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }
/** * @deprecated use {@link #getErrorMessage() } instead */ public SVNException getError() { if (myErrorMessage != null) { return new SVNException(getErrorMessage()); } return null; }