Examples of SVNErrorMessage


Examples of org.tmatesoft.svn.core.SVNErrorMessage

    }
   
    private Map doRelocate(SVNAdminArea adminArea, String name, String from, String to, boolean recursive, Map validatedURLs) throws SVNException {
        SVNEntry entry = adminArea.getEntry(name, true);
        if (entry == null) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND);
            SVNErrorManager.error(err, SVNLogType.WC);
        }
       
        if (entry.isFile()) {
            relocateEntry(entry, from, to, validatedURLs);
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

            repository.setAuthenticationManager( authManager );

            SVNNodeKind nodeKind = repository.checkPath( "",
                                                         -1 );
            if ( nodeKind == SVNNodeKind.NONE ) {
                SVNErrorMessage err = SVNErrorMessage.create( SVNErrorCode.UNKNOWN,
                                                              "No entry at URL ''{0}''",
                                                              url );
                throw new SVNException( err );
            } else if ( nodeKind == SVNNodeKind.FILE ) {
                SVNErrorMessage err = SVNErrorMessage.create( SVNErrorCode.UNKNOWN,
                                                              "Entry at URL ''{0}'' is a file while directory was expected",
                                                              url );
                throw new SVNException( err );
            }
        } catch ( SVNException e ) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

            repository.setAuthenticationManager( authManager );

            SVNNodeKind nodeKind = repository.checkPath( "",
                                                         -1 );
            if ( nodeKind == SVNNodeKind.NONE ) {
                SVNErrorMessage err = SVNErrorMessage.create( SVNErrorCode.UNKNOWN,
                                                              "No entry at URL ''{0}''",
                                                              url );
                throw new SVNException( err );
            } else if ( nodeKind == SVNNodeKind.FILE ) {
                SVNErrorMessage err = SVNErrorMessage.create( SVNErrorCode.UNKNOWN,
                                                              "Entry at URL ''{0}'' is a file while directory was expected",
                                                              url );
                throw new SVNException( err );
            }
        } catch ( SVNException e ) {
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

         * "" (empty string) is path relative to that URL,
         * -1 is value that may be used to specify HEAD (latest) revision.
         */
        SVNNodeKind nodeKind = repository.checkPath("", -1);
        if (nodeKind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "No entry at URL ''{0}''", url);
            throw new SVNException(err);
        } else if (nodeKind == SVNNodeKind.FILE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Entry at URL ''{0}'' is a file while directory was expected", url);
            throw new SVNException(err);
        }

        /*
         * Get latest repository revision. We will export repository contents at this very revision.
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

                //throw new SVNException(err);
            } else {
                try {
                    file.createNewFile();
                } catch (IOException e) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "error: cannot create new  file ''{0}''", file);
                    throw new SVNException(err);
                }
            }
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

        }
       
        if (uuid != null) {
            String reposUUID = repository.getRepositoryUUID(true);
            if (!uuid.equals(reposUUID)) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_UUID_MISMATCH,
                        "Repository UUID ''{0}'' doesn''t match expected UUID ''{1}''",
                        new Object[] { reposUUID, uuid });
                SVNErrorManager.error(err, SVNLogType.WC);
            }
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

                myEventDispatcher.handleEvent(event, progress);
            } catch (SVNException e) {
                throw e;
            } catch (Throwable th) {
                SVNDebugLog.getDefaultLog().logSevere(SVNLogType.WC, th);
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN,
                        "Error while dispatching event: {0}", new Object[] { th.getMessage() },
                        SVNErrorMessage.TYPE_ERROR, th);
                SVNErrorManager.error(err, th, SVNLogType.DEFAULT);
            }
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

    }

    protected long getRevisionNumber(SVNRevision revision, long[] latestRevisionNumber, SVNRepository repository,
            File path) throws SVNException {
        if (repository == null && (revision == SVNRevision.HEAD || revision.getDate() != null)) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_RA_ACCESS_REQUIRED);
            SVNErrorManager.error(err, SVNLogType.WC);
        }
        if (revision.getNumber() >= 0) {
            return revision.getNumber();
        } else if (revision.getDate() != null) {
            return repository.getDatedRevision(revision.getDate());
        } else if (revision == SVNRevision.HEAD) {
            if (latestRevisionNumber != null && latestRevisionNumber.length > 0 && SVNRevision.isValidRevisionNumber(latestRevisionNumber[0])) {
                return latestRevisionNumber[0];
            }
            long latestRevision = repository.getLatestRevision();
            if (latestRevisionNumber != null && latestRevisionNumber.length > 0) {
                latestRevisionNumber[0] = latestRevision;
            }
            return latestRevision;
        } else if (!revision.isValid()) {
            return -1;
        } else if (revision == SVNRevision.COMMITTED || revision == SVNRevision.WORKING ||
                revision == SVNRevision.BASE || revision == SVNRevision.PREVIOUS) {
            if (path == null) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_VERSIONED_PATH_REQUIRED);
                SVNErrorManager.error(err, SVNLogType.WC);
            }
            SVNWCAccess wcAccess = createWCAccess();
            wcAccess.probeOpen(path, false, 0);
            SVNEntry entry = null;
            try {
                entry = wcAccess.getVersionedEntry(path, false);
            } finally {
                wcAccess.close();
            }
           
            if (revision == SVNRevision.WORKING || revision == SVNRevision.BASE) {
                return entry.getRevision();
            }
            if (entry.getCommittedRevision() < 0) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_BAD_REVISION, "Path ''{0}'' has no committed revision", path);
                SVNErrorManager.error(err, SVNLogType.WC);
            }
            return revision == SVNRevision.PREVIOUS ? entry.getCommittedRevision() - 1 : entry.getCommittedRevision();           
        } else {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_BAD_REVISION, "Unrecognized revision type requested for ''{0}''", path != null ? path : (Object) repository.getLocation());
            SVNErrorManager.error(err, SVNLogType.WC);
        }
        return -1;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

    protected SVNRepository createRepository(SVNURL url, File path, SVNAdminArea area, SVNRevision pegRevision,
            SVNRevision revision, long[] pegRev) throws SVNException {
        if (url == null) {
            SVNURL pathURL = getURL(path);
            if (pathURL == null) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL,
                        "''{0}'' has no URL", path);
                SVNErrorManager.error(err, SVNLogType.WC);
            }
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.SVNErrorMessage

        }
       
        String reposRootPath = reposRootURL.getPath();
        String absPath = url.getPath();
        if (!absPath.startsWith(reposRootPath)) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_UNRELATED_RESOURCES,
                    "URL ''{0}'' is not a child of repository root URL ''{1}''", new Object[] { url,
                    reposRootURL});
            SVNErrorManager.error(err, SVNLogType.WC);
        }
        absPath = absPath.substring(reposRootPath.length());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.