Package org.tmatesoft.svn.core.wc

Examples of org.tmatesoft.svn.core.wc.SVNClientManager.createRepository()


            clientManager = clientManagerPool.borrowObject();
            if (clientManager == null) {
                throw new StoreException.ReadException("Failed to acquire SVNClientManager");
            }
            // do not explicitly close the session because mayReuse=true
            final SVNRepository repository = clientManager.createRepository(svnUrl, true);

            return operation.execute(repository, clientManager);
        } catch (Exception e) {
            Throwables.propagateIfInstanceOf(e, StoreException.class);
            throw operation.handleException(e);
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);
    }
   
    public void tearDown() throws Exception {
        svnRepo = null;
        super.tearDown();
View Full Code Here

      SVNURL userRepoUrl = SVNURL.fromFile(getUserRepoDirectory(user));
      if (userRepoUrl == null) {
        return null;
      }
      SVNRepository repo = svnClientManager.createRepository(userRepoUrl, true);
      SVNNodeKind nodeKind = repo.checkPath(path, -1);
      if (nodeKind == SVNNodeKind.NONE) {
        return null;
      }
      outputStream = new ByteArrayOutputStream();
View Full Code Here

    ISVNEditor editor = null;
    String checksum = null;
    InputStream bais = null;
    try {
      svnClientManager = getSVNClientManager();
      SVNRepository repo = svnClientManager.createRepository(SVNURL.fromFile(getUserRepoDirectory(user)), true);
      SVNDirEntry dirEntry = repo.info(fileEntry.getPath(), -1);

      // Add base paths
      String fullPath = "";
      // Check.. first
View Full Code Here

  public void delete(User user, List<String> paths) {
    SVNClientManager svnClientManager = null;
    ISVNEditor editor = null;
    try {
      svnClientManager = getSVNClientManager();
      SVNRepository repo = svnClientManager.createRepository(SVNURL.fromFile(getUserRepoDirectory(user)), true);

      editor = repo.getCommitEditor("delete", null, true, null);
      editor.openRoot(-1);
      for (String each : paths) {
        editor.deleteEntry(each, -1);
View Full Code Here

  public boolean hasOne(User user, String path) {
    SVNClientManager svnClientManager = null;
    try {
      svnClientManager = getSVNClientManager();
      SVNURL userRepoUrl = SVNURL.fromFile(getUserRepoDirectory(user));
      SVNRepository repo = svnClientManager.createRepository(userRepoUrl, true);
      SVNNodeKind nodeKind = repo.checkPath(path, -1);
      return (nodeKind != SVNNodeKind.NONE);
    } catch (Exception e) {
      LOG.error("Error while fetching files from SVN", e);
      throw processException("Error while checking file existence from SVN", e);
View Full Code Here

    FileOutputStream fileOutputStream = null;
    try {
      svnClientManager = getSVNClientManager();

      SVNURL userRepoUrl = SVNURL.fromFile(getUserRepoDirectory(user));
      SVNRepository repo = svnClientManager.createRepository(userRepoUrl, true);
      SVNNodeKind nodeKind = repo.checkPath(path, -1);
      // If it's DIR, it does not work.
      if (nodeKind == SVNNodeKind.NONE || nodeKind == SVNNodeKind.DIR) {
        throw processException("It's not possible to write directory. nodeKind is " + nodeKind);
      }
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.