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(); } }
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 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(); } }
abortEdit(); } catch (SVNException e) { SVNDebugLog.getDefaultLog().logError(SVNLogType.DEFAULT, e);