Package org.tmatesoft.svn.core.wc

Examples of org.tmatesoft.svn.core.wc.SVNClientManager


        ourClientManager.dispose();
    }

    public void testTitleAdding() throws SVNException, IOException, JDOMException {
        SVNClientManager ourClientManager = SVNClientManager.newInstance();
        // checkout working copy
        SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
        updateClient.setIgnoreExternals(false);
        updateClient.doCheckout(tgtURL, WORKING_COPY, SVNRevision.UNDEFINED, SVNRevision.HEAD, SVNDepth.INFINITY, true);
        // add file under version control
        int id = 1;
        create(ourClientManager, id);
View Full Code Here


            String sourceURL = getCommandLine().getURL(1);
            if (matchTabsInURL(sourceURL, err)) {
                return;
            }
           
            SVNClientManager manager = getClientManager();
            SVNAdminClient adminClient = manager.getAdminClient();
            adminClient.doInitialize(SVNURL.parseURIDecoded(sourceURL), SVNURL.parseURIDecoded(destURL));
            SVNCommand.println(out, "Copied properties for revision 0.");
        }
    }
View Full Code Here

            String destURL = getCommandLine().getURL(0);
            if (matchTabsInURL(destURL, err)) {
                return;
            }

            SVNClientManager manager = getClientManager();
            SVNAdminClient adminClient = manager.getAdminClient();
            final PrintStream outStream = out;
            adminClient.setReplayHandler(new ISVNLogEntryHandler() {
                public void handleLogEntry(SVNLogEntry logEntry) throws SVNException {
                    SVNCommand.println(outStream, "Committed revision " + logEntry.getRevision() + ".");
                }
View Full Code Here

               
            } else {
                revNumber = revision.getNumber();
            }
           
            SVNClientManager manager = getClientManager();
            SVNAdminClient adminClient = manager.getAdminClient();
            adminClient.doCopyRevisionProperties(SVNURL.parseURIDecoded(destURL), revNumber);
        }
    }
View Full Code Here

   *            used for authentication on the repository's server
   */
  private void checkProjectRepository(String svnUrl, String svnUser,
      String svnPassword) throws SVNException {

    SVNClientManager svnClientManager = SVNClientManager.newInstance();

    if (!svnUser.isEmpty() && !svnPassword.isEmpty()) {

      ISVNAuthenticationManager authManager = new BasicAuthenticationManager(
          svnUser, svnPassword);
      svnClientManager.setAuthenticationManager(authManager);
    }

    SVNWCClient wcClient = svnClientManager.getWCClient();

    wcClient.setIgnoreExternals(false);

    wcClient.doInfo(SVNURL.parseURIDecoded(svnUrl), SVNRevision.HEAD,
        SVNRevision.HEAD, SVNDepth.IMMEDIATES, new ISVNInfoHandler() {
View Full Code Here

   
    public void setUp() throws Exception {
        super.setUp();
        File repo = new CopyExisting(DefaultSVNLogFilter.class.getResource("JENKINS-10449.zip")).allocate();
        SVNURL svnUrl = SVNURL.fromFile(repo);
        SVNClientManager svnMgr = SVNClientManager.newInstance();
        svnRepo = svnMgr.createRepository(svnUrl, false);
    }
View Full Code Here

    project.setScm(subversionSCM);
    assertBuildStatusSuccess(project.scheduleBuild2(0));

    // Create a status client and get the working copy format.
    SVNClientManager testWCVerseion = SVNClientManager.newInstance(null, "testWCVerseion", null);
    File path = new File(project.getWorkspace().getRemote());
    return testWCVerseion.getStatusClient().doStatus(path,
            true).getWorkingCopyFormat();
  }
View Full Code Here

        for (ModuleLocation l : scm.getLocations(env, build)) {
            ISVNAuthenticationProvider authProvider =
                    CredentialsSVNAuthenticationProviderImpl
                            .createAuthenticationProvider(build.getParent(), scm, l);
            final SVNClientManager manager = SubversionSCM.createClientManager(authProvider).getCore();
            try {
                SVNLogClient svnlc = manager.getLogClient();
                PathContext context = getUrlForPath(workspace.child(l.getLocalDir()), authProvider);
                context.moduleWorkspacePath = l.getLocalDir();
                changelogFileCreated |= buildModule(context, svnlc, logHandler);
            } finally {
                manager.dispose();
            }
        }
        ISVNAuthenticationProvider authProvider =
                CredentialsSVNAuthenticationProviderImpl
                        .createAuthenticationProvider(build.getParent(), scm, null);
        final SVNClientManager manager = SubversionSCM.createClientManager(authProvider).getCore();
        try {
            SVNLogClient svnlc = manager.getLogClient();
            for(SubversionSCM.External ext : externals) {
                PathContext context = getUrlForPath(workspace.child(ext.path), authProvider);
                context.moduleWorkspacePath = ext.path;
                changelogFileCreated |= buildModule(context, svnlc, logHandler);
            }
        } finally {
            manager.dispose();
        }

        if(changelogFileCreated) {
            logHandler.endDocument();
        }
View Full Code Here

    SVNRevision svnRevision = SVNRevision.HEAD;
    if (revision != null && -1L != revision) {
      svnRevision = SVNRevision.create(revision);
    }
    final List<FileEntry> fileEntries = newArrayList();
    SVNClientManager svnClientManager = getSVNClientManager();
    try {
      svnClientManager.getLogClient().doList(SVNURL.fromFile(getUserRepoDirectory(user)).appendPath(path, true),
          svnRevision, svnRevision, true, recursive, new ISVNDirEntryHandler() {
        @Override
        public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException {

          FileEntry script = new FileEntry();
View Full Code Here

   * @param user user
   * @return found {@link FileEntry}s
   */
  public List<FileEntry> findAll(final User user) {
    final List<FileEntry> scripts = newArrayList();
    SVNClientManager svnClientManager = getSVNClientManager();
    try {
      svnClientManager.getLogClient().doList(SVNURL.fromFile(getUserRepoDirectory(user)), SVNRevision.HEAD,
          SVNRevision.HEAD, false, true, new ISVNDirEntryHandler() {
        @Override
        public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException {
          FileEntry script = new FileEntry();
          String relativePath = dirEntry.getRelativePath();
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.wc.SVNClientManager

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.