Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNException


        if (err1.getErrorCode() == SVNErrorCode.CANCELLED || err2.getErrorCode() == SVNErrorCode.CANCELLED) {
            throw new SVNCancelException(err1);
        } else if (err1.getErrorCode().isAuthentication() || err2.getErrorCode().isAuthentication()) {
            throw new SVNAuthenticationException(err1, cause);
        }
        throw new SVNException(err1, cause);
    }
View Full Code Here


    private void fixError(String path, SVNException e, SVNNodeKind kind) throws SVNException {
        SVNErrorMessage err = e.getErrorMessage();
        if (err.getErrorCode() == SVNErrorCode.FS_NOT_FOUND || err.getErrorCode() == SVNErrorCode.RA_DAV_PATH_NOT_FOUND) {
            err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_UP_TO_DATE, kind == SVNNodeKind.DIR ?
                    "Directory ''{0}'' is out of date" : "File ''{0}'' is out of date", path);
            throw new SVNException(err);
        }
        throw e;
    }
View Full Code Here

            if (e instanceof SVNException) {
                throw (SVNException) e;
            } else if (e instanceof Error) {
                throw (Error) e;
            }
            throw new SVNException(SVNErrorMessage.create(SVNErrorCode.UNKNOWN), e);
        }
        runner.logCompleted(this);
        // delete all logs, there shoudn't be left unprocessed.
        File[] logsFiles = getAdminDirectory().listFiles();
        if (logsFiles != null) {
View Full Code Here

        public OutputStream getOutputStream(String path) throws SVNException {
          try {
            return new FileOutputStream(destPath);
          }
          catch (FileNotFoundException e) {
            throw new SVNException(SVNErrorMessage.create(SVNErrorCode.BAD_FILENAME, e
                .getMessage()));
          }
        }
      });
View Full Code Here

        checkIfPathIsUnderRoot(path);
        doDeleteEntry(path, myCurrentDirectory.getAdminArea(), myCurrentDirectory, theirURL);
    }

    private void handleLeftLocalModificationsError(SVNException originalError) throws SVNException {
        SVNException error = null;
        for (error = originalError; error != null;) {
            if (error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) {
                break;
            }
            error = (error.getCause() instanceof SVNException) ? (SVNException) error.getCause() : null;
        }
        if (error != null) {
            return;
        }
        throw originalError;
View Full Code Here

         * -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

            } 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

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

      transaction = transact.beginTransaction();

    } catch (Exception e) {
      SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR,
          "error: failed to initialize database.");
      throw new SVNException(err);
    }
   
    currentPath = "";
  }
View Full Code Here

      currentDirectory = child;
    } catch (PermissionDeniedException e) {
      SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR,
          "error: failed on permission.");
      throw new SVNException(err);

    } catch (IOException e) {
      SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR,
          "error: failed on IO.");
      throw new SVNException(err);
    } catch (TriggerException e) {
      SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR,
          "error: failed on IO.");
      throw new SVNException(err);
    }
  }
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.SVNException

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.