return new DAVCommitEditor(this, myConnection, logMessage, mediator, new Runnable() { public void run() { closeConnection();
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { DAVResource directory = (DAVResource) myDirsStack.peek(); checkoutResource(directory, true); directory.putProperty(name, value); myPathsMap.put(directory.getURL(), directory.getPath()); }
public void openRoot(long revision) throws SVNException { // make activity myActivity = createActivity(); DAVResource root = new DAVResource(myCommitMediator, myConnection, "", revision); root.fetchVersionURL(null, false); myDirsStack.push(root); myPathsMap.put(root.getURL(), root.getPath()); }
public SVNCommitInfo closeEdit() throws SVNException { try { if (!myDirsStack.isEmpty()) { DAVResource resource = (DAVResource) myDirsStack.pop(); // do proppatch if there were property changes. if (resource.getProperties() != null) { StringBuffer request = DAVProppatchHandler.generatePropertyRequest(null, resource.getProperties()); myConnection.doProppatch(resource.getURL(), resource.getWorkingURL(), request, null, null); } resource.dispose(); } DAVMergeHandler handler = new DAVMergeHandler(myCommitMediator, myPathsMap); HTTPStatus status = myConnection.doMerge(myActivity, true, handler); if (status.getError() != null) { // DELETE shouldn't be called anymore if there is an error or MERGE. // calling abortEdit will do nothing on closeEdit failure now. myIsAborted = true; SVNErrorManager.error(status.getError(), SVNLogType.NETWORK); } return handler.getCommitInfo(); } finally { // we should run abort edit if exception is thrown // abort edit will not be run if there was an error (from server side) on MERGE. abortEdit(); // always run close callback to 'unlock' SVNRepository. runCloseCallback(); } }
if (!myConnection.hasHttpV2Support()) { patchResourceProperties(myActivityLocation, myRevProps); abortEdit(); } catch (SVNException e) { SVNDebugLog.getDefaultLog().logError(SVNLogType.DEFAULT, e); runCloseCallback();
final byte[] txnPostBody = createTxnPostBody(postWithRevProps ? myRevProps : null); final String mimeType = SKEL_MIME_TYPE; final String path = myConnection.getMeResource(); } else { final String[] activityUrls = createActivity(); myActivity = activityUrls[0]; myActivityLocation = activityUrls[1]; patchResourceProperties(propPatchTarget, myRevProps);
patchResourceProperties(location, myRevProps); if (authorRevisionProperty != null) { myRevProps = new SVNProperties();
public SVNCommitInfo closeEdit() throws SVNException { try { if (!myDirsStack.isEmpty()) { DAVResource resource = (DAVResource) myDirsStack.pop(); // do proppatch if there were property changes. if (resource.getProperties() != null) { StringBuffer request = DAVProppatchHandler.generatePropertyRequest(null, resource.getProperties()); myConnection.doProppatch(resource.getURL(), resource.getWorkingURL(), request, null, null); } resource.dispose(); } DAVMergeHandler handler = new DAVMergeHandler(myCommitMediator, myPathsMap); HTTPStatus status = myConnection.doMerge(myActivity, true, handler); if (status.getError() != null) { // DELETE shouldn't be called anymore if there is an error or MERGE. // calling abortEdit will do nothing on closeEdit failure now. myIsAborted = true; SVNErrorManager.error(status.getError()); } // abort edit will not be run if there was an error on MERGE. abortEdit(); return handler.getCommitInfo(); } finally { // always run close callback to 'unlock' SVNRepository. runCloseCallback(); } }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { DAVResource directory = (DAVResource) myDirsStack.peek(); checkoutResource(directory, true); directory.putProperty(name, value); myPathsMap.put(directory.getURL(), directory.getPath()); }
public SVNCommitInfo closeEdit() throws SVNException { try { if (!myDirsStack.isEmpty()) { DAVResource resource = (DAVResource) myDirsStack.pop(); // do proppatch if there were property changes. if (resource.getProperties() != null) { StringBuffer request = DAVProppatchHandler.generatePropertyRequest(null, resource.getProperties()); myConnection.doProppatch(resource.getURL(), resource.getWorkingURL(), request, null, null); } resource.dispose(); } DAVMergeHandler handler = new DAVMergeHandler(myCommitMediator, myPathsMap); HTTPStatus status = myConnection.doMerge(myActivity, true, handler); if (status.getError() != null) { // DELETE shouldn't be called anymore if there is an error or MERGE. // calling abortEdit will do nothing on closeEdit failure now. myIsAborted = true; SVNErrorManager.error(status.getError(), SVNLogType.NETWORK); } return handler.getCommitInfo(); } finally { // we should run abort edit if exception is thrown // abort edit will not be run if there was an error (from server side) on MERGE. abortEdit(); // always run close callback to 'unlock' SVNRepository. runCloseCallback(); } }
return new DAVCommitEditor(this, connection, revProps, mediator, new Runnable() { public void run() { closeConnection();
public void openRoot(long revision) throws SVNException { // make activity myActivity = createActivity(); DAVResource root = new DAVResource(myCommitMediator, myConnection, "", revision); root.fetchVersionURL(null, false); myDirsStack.push(root); myPathsMap.put(root.getURL(), root.getPath()); }
public void changeDirProperty(String name, String value) throws SVNException { DAVResource directory = (DAVResource) myDirsStack.peek(); checkoutResource(directory, true); directory.putProperty(name, value); myPathsMap.put(directory.getURL(), directory.getPath()); }
return new DAVCommitEditor(this, connection, revProps, mediator, new Runnable() { public void run() { closeConnection();
public void openRoot(long revision) throws SVNException { // make activity myActivity = createActivity(myLogMessage); DAVResource root = new DAVResource(myCommitMediator, myConnection, "", revision); root.fetchVersionURL(false); myDirsStack.push(root); myPathsMap.put(root.getURL(), root.getPath()); }
public void changeDirProperty(String name, SVNPropertyValue value) throws SVNException { DAVResource directory = (DAVResource) myDirsStack.peek(); if (!myConnection.hasHttpV2Support()) { checkoutResource(directory, true); } directory.putProperty(name, value); myPathsMap.put(directory.getURL(), directory.getPath()); }