private void doSVNSubmit() throws SVNException {
   svnManager.doImportIfNecessary();
   svnManager.doCleanupIfPossible();
   svnManager.doCheckout();
   svnManager.doAdd();
   notifyPreCommit();
   svnManager.doCommit();
   updateLocalRevisionNumbers();
 }
 private void resolveLocalAndRemoteDataMismatches() throws SVNException, CoreException {
   if (svnManager.isWatchedFolderInRepository()) {
     if (!svnManager.isWorkingDirectoryValid()) {
       removeRemoteData(
           "Deleted the remote data because the personal worskpace existed on the remote repository, but, the local working copy was invalid.");
     } else if (svnManager.isLocalWorkCopyOutdated()) {
       removeLocalAndRemoteData(
           "Deleted the remote data because the local working copy was outdated.");
     }
   } else {
     svnManager.removeSVNMetaData();
   }
 }
  public AuthenticanResult authenticate() throws InitializationException {
    AuthenticationProvider prompter = getAuthenticationPrompterLazily();
    AuthenticationInfo authenticationInfo = prompter.findUsernamePassword();

    if (isCanceled(authenticationInfo)) {
      return AuthenticanResult.CANCELED_AUTHENTICATION;
    }

    uuid = PrefsFacade.getInstance().getAndSetUUIDLazily();
    URLManager urlManager =
        new URLManager(prompter.getRepositoryURL(), authenticationInfo.getUserName(), uuid);
    svnManager =
        new SVNManager(
            urlManager,
            WATCHED_FOLDER,
            authenticationInfo.getUserName(),
            authenticationInfo.getPassword());
    if (!svnManager.isAuthenticationInformationValid()) {
      return AuthenticanResult.WRONG_AUTHENTICATION;
    }

    try {
      prompter.saveAuthenticationInfo(authenticationInfo);
    } catch (StorageException e) {
      throw new InitializationException(e);
    } catch (IOException e) {
      throw new InitializationException(e);
    }

    return AuthenticanResult.OK;
  }
 private void updateLocalRevisionNumbers() throws SVNException {
   svnManager.doUpdate();
 }
 private void removeLocalAndRemoteData(String svnMessage) throws CoreException, SVNException {
   svnManager.removeSVNMetaData();
   removeRemoteData(svnMessage);
 }
 private void removeRemoteData(String svnMessage) throws SVNException {
   svnManager.doDelete(svnMessage);
 }
 /**
  * This method is used by an automated test.
  *
  * @return
  * @throws SVNException
  */
 public boolean doLocalAndRemoteDataMatch() throws SVNException {
   return svnManager.isWatchedFolderInRepository()
       && svnManager.isWorkingDirectoryValid()
       && !svnManager.isLocalWorkCopyOutdated();
 }