Package org.tmatesoft.svn.core.internal.io.dav.http

Examples of org.tmatesoft.svn.core.internal.io.dav.http.HTTPStatus


            openConnection();
            StringBuffer request = DAVReplayHandler.generateReplayRequest(highRevision, lowRevision, sendDeltas);
            DAVReplayHandler handler = new DAVReplayHandler(editor, true);

            String bcPath = SVNEncodingUtil.uriEncode(getLocation().getPath());
            HTTPStatus status = myConnection.doReport(bcPath, request, handler);
            if (status.getCode() == 501) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED, "'replay' REPORT not implemented");
                SVNErrorManager.error(err, status.getError());
            } else if (status.getError() != null) {
                SVNErrorManager.error(status.getError());
            }
        } finally {
            closeConnection();
        }
View Full Code Here


            } catch (SVNException e) {
                // no need to call close edit here, I suppose,
                // no editing has been started yet.
                throw e;
            }
          HTTPStatus status = myConnection.doReport(bcPath, request, handler);
            if (status.getError() != null) {
                SVNErrorManager.error(status.getError());
            }
        } finally {
            closeConnection();
        }
    }
View Full Code Here

                bcPath = DAVUtil.getVCCPath(myConnection, this, bcPath);
            } catch (SVNException e) {
                editor.closeEdit();
                throw e;
            }
            HTTPStatus status = myConnection.doReport(bcPath, request, handler);
            if (status.getError() != null) {
                SVNErrorManager.error(status.getError());
            }
        } finally {
            closeConnection();
        }
    }
View Full Code Here

            openConnection();
            StringBuffer request = DAVEditorHandler.generateEditorRequest(myConnection, null, getLocation().toString(), targetRevision, target, url.toString(), recursive, ignoreAncestry, false, getContents, reporter);
            DAVEditorHandler handler = new DAVEditorHandler(editor, true);
            String path = SVNEncodingUtil.uriEncode(getLocation().getPath());
            path = DAVUtil.getVCCPath(myConnection, this, path);
            HTTPStatus status = myConnection.doReport(path, request, handler, true);
            if (status.getError() != null) {
                SVNErrorManager.error(status.getError());
            }
        } finally {
            closeConnection();
        }
    }
View Full Code Here

            openConnection();
            StringBuffer request = DAVEditorHandler.generateEditorRequest(myConnection, null, getLocation().toString(), revision, target, null, recursive, false, false, false, reporter);
            DAVEditorHandler handler = new DAVEditorHandler(editor, false);
            String path = SVNEncodingUtil.uriEncode(getLocation().getPath());
            path = DAVUtil.getVCCPath(myConnection, this, path);
            HTTPStatus status = myConnection.doReport(path, request, handler);
            if (status.getError() != null) {
                SVNErrorManager.error(status.getError());
            }
        } finally {
            closeConnection();
        }
    }
View Full Code Here

                    throw e;
                }
            }
            DAVElement[] elements = null;
            Map propsMap = new HashMap();
            HTTPStatus status = DAVUtil.getProperties(myConnection, path, 0, null, elements, propsMap);
            if (status.getError() != null) {
                if (status.getError().getErrorCode() == SVNErrorCode.RA_DAV_PATH_NOT_FOUND) {
                    return null;
                }
                SVNErrorManager.error(status.getError());
            }
            if (!propsMap.isEmpty()) {
                DAVProperties props = (DAVProperties) propsMap.values().iterator().next();
                return createDirEntry(fullPath, props);
            }
View Full Code Here

        return connection.doPropfind(path, header, body, davHandler);
    }
   
    public static DAVProperties getResourceProperties(DAVConnection connection, String path, String label, DAVElement[] properties) throws SVNException {
        Map resultMap = new HashMap();
        HTTPStatus status = getProperties(connection, path, DEPTH_ZERO, label, properties, resultMap);
        if (status.getError() != null) {
            SVNErrorManager.error(status.getError());
        }
        if (label != null || true) {
            if (!resultMap.isEmpty()) {
                return (DAVProperties) resultMap.values().iterator().next();
            }
View Full Code Here

            info.revision = Long.parseLong(version);
        }
        if (includeType) {
            Map propsMap = new HashMap();
            path = SVNPathUtil.append(info.baselineBase, info.baselinePath);
            HTTPStatus status = getProperties(connection, path, 0, null, new DAVElement[] {DAVElement.RESOURCE_TYPE}, propsMap);
            if (status.getError() != null) {
                SVNErrorManager.error(status.getError());
            }
            if (!propsMap.isEmpty()) {
                DAVProperties props = (DAVProperties) propsMap.values().iterator().next();
                info.isDirectory = props != null && props.isCollection();
            }
View Full Code Here

                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();
      }
View Full Code Here

        String path = SVNEncodingUtil.uriEncode(myLocation.getPath());
        String vcc = DAVUtil.getPropertyValue(myConnection, path, null, DAVElement.VERSION_CONTROLLED_CONFIGURATION);
       
        // TODO implement retry line in native subversion.
        String head = DAVUtil.getPropertyValue(myConnection, vcc, null, DAVElement.CHECKED_IN);
        HTTPStatus status = myConnection.doCheckout(activity, null, head, false);
        String location = status.getHeader().getFirstHeaderValue(HTTPHeader.LOCATION_HEADER);
        if (location == null) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED, "The CHECKOUT response did not contain a 'Location:' header");
            SVNErrorManager.error(err);
        }
        // proppatch log message.
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.io.dav.http.HTTPStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.