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

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


            String root = absolutePath ? myRepositoryRoot.getPath() : getLocation().getPath();
            root = SVNEncodingUtil.uriEncode(root);
            DAVBaselineInfo info = DAVUtil.getBaselineInfo(myConnection, this, root, pegRevision, false,
                    false, null);           
            path = SVNPathUtil.append(info.baselineBase, info.baselinePath);
            HTTPStatus status = myConnection.doReport(path, request, davHandler);
            if (status.getCode() == 501) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_NOT_IMPLEMENTED,
                        "'get-location-segments' REPORT not implemented");
                SVNErrorManager.error(err, status.getError(), SVNLogType.NETWORK);
            } else if (status.getError() != null) {
                SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
            }
            return davHandler.getTotalRevisions();
        } finally {
            closeConnection();
        }
View Full Code Here


            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(), SVNLogType.NETWORK);
            } else if (status.getError() != null) {
                SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
            }
        } finally {
            closeConnection();
        }
    }
View Full Code Here

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

            paths = new String[]{""};
        }
        StringBuffer request = DAVMergeInfoHandler.generateMergeInfoRequest(null, revision, paths,
                inherit, includeDescendants);
        DAVMergeInfoHandler handler = new DAVMergeInfoHandler();
        HTTPStatus status = myConnection.doReport(path, request, handler);
        if (status.getCode() == 501) {
          SVNErrorMessage err = status.getError() != null ? status.getError() : SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Server does not support mergeinfo");
          SVNErrorManager.error(err, SVNLogType.NETWORK);
        }
        if (status.getError() != null) {
            SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
        }
        Map mergeInfo = handler.getMergeInfo();
        if (mergeInfo == null) {
          return null;
        }
View Full Code Here

                if (closeEditorOnException) {
                    editor.closeEdit();
                }
                throw e;
            }
            HTTPStatus status = myConnection.doReport(bcPath, request, handler, spool);
            if (status.getError() != null) {
                SVNErrorManager.error(status.getError(), SVNLogType.NETWORK);
            }
        } finally {
            if (handler != null) {
                handler.closeConnection();
            }
View Full Code Here

                }
                getDescription().append(cdata);
            }
        } else if (element == DAVElement.STATUS) {
            try {
                HTTPStatus status = HTTPStatus.createHTTPStatus(cdata.toString());
                if (parent != DAVElement.PROPSTAT) {
                    myResponseContainsError |= status.getCodeClass() != 2;
                } else {
                    myPropstatContainsError = status.getCodeClass() != 2;
                }
            } catch (ParseException e) {
                SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_REQUEST_FAILED,
                        "The response contains a non-conforming HTTP status line"), SVNLogType.NETWORK);
View Full Code Here

        } else if (element == DAVElement.STATUS) {
            if (cdata == null) {
                invalidXML();
            }
            try {
                HTTPStatus status = HTTPStatus.createHTTPStatus(cdata.toString());
                if (status == null) {
                    invalidXML();
                }
                myStatusCode = status.getCode();
            } catch (ParseException e) {
                invalidXML();
            }
            return;
        } else if (element == DAVElement.HREF) {
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.