Examples of SVNRevision


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

   * @param actionData needed for Subversion connection information so that svn blame can be executed
   */
  private void annotateWithEditor(Artifact artifact, ActionData actionData) {
    SVNLogClient logClient = SVNClientManager.newInstance().getLogClient();
    AnnotationHandler ah = new AnnotationHandler(artifact, actionData);
    SVNRevision rev = SVNRevision.create(actionData.getRevision());
    try {
      logClient.doAnnotate(actionData.getSourceURL(), rev, SVNRevision.create(1), rev, ah);
    } catch (Exception e) {
      logger.error("Failed to annotate with editor information", e);
    }
View Full Code Here

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

        final CollectedRevisions revisions = new CollectedRevisions();
        Info info = svn.getInfo(file);
        if (info == null) {
            throw new SVNException(SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Error retrieving SVN information for file"));
        }
        SVNRevision committedRevision = info.getRevision();
        if (committedRevision == null) {
            throw new SVNException(SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "Error determining current file revision"));
        }
        boolean isDirectory = info.getKind() != NodeKind.FILE;
        final long currentRevision = committedRevision.getNumber();
        String repoRoot = info.getRepositoryRootURL().toString();
        final String relPath = info.getURL().toString().substring(repoRoot.length());

        SVNRepository repo = svn.getSvnKitManager().createRepository(repoRoot);
        boolean mergeInfoAvailable = repo.hasCapability(SVNCapability.MERGE_INFO);
View Full Code Here

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

                revisionHistory.getRepoRoot(), r.getRelPath(), null, r.getRevisionNumber());
        return ContentRevisionVirtualFile.create(cr);
    }

    private VcsFileRevision createVcsFileRevision(Revision r, boolean checkCurrentRevision) {
        SVNRevision svnRev = SVNRevision.create(r.getRevisionNumber());
        if (checkCurrentRevision && r == model.getCurrentRevision()) {
            return new CurrentRevision(_filePath.getVirtualFile(), new SvnRevisionNumber(svnRev));
        } else {
            SvnVcs svnVcs = SvnVcs.getInstance(_project);
            return new SvnFileRevision(svnVcs, svnRev, svnRev,
View Full Code Here

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

            // Create SVNURL from changed file
            SVNURL svnURLChangedPath =
                    SVNURL.parseURIDecoded(fRepository.getRepositoryRoot(true).toDecodedString() + changedPath);

            // Create SVNRevisions from respective numbers
            SVNRevision currentRevision = SVNRevision.create(currRevisionNumber);
            SVNRevision previousRevision = SVNRevision.create(prevRevisionNumber);

            // Do the diff
            SVNDiffClient diffClient = SVNClientManager.newInstance().getDiffClient();
            ByteArrayOutputStream diffBuffer = new ByteArrayOutputStream();
            diffClient.doDiff(
View Full Code Here

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

        Collection expanded = new ArrayList(sources.length);
        for (int i = 0; i < sources.length; i++) {
            SVNCopySource source = sources[i];
            if (source.isCopyContents() && source.isURL()) {
                // get children at revision.
                SVNRevision pegRevision = source.getPegRevision();
                if (!pegRevision.isValid()) {
                    pegRevision = SVNRevision.HEAD;
                }
                SVNRevision startRevision = source.getRevision();
                if (!startRevision.isValid()) {
                    startRevision = pegRevision;
                }
                SVNRepositoryLocation[] locations = getLocations(source.getURL(), null, null, pegRevision, startRevision, SVNRevision.UNDEFINED);
                SVNRepository repository = createRepository(locations[0].getURL(), null, null, true);
                long revision = locations[0].getRevisionNumber();
View Full Code Here

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

                                }
                            } finally {
                                wcAccess.closeAdminArea(externalWC);
                            }

                            SVNRevision externalsWCRevision = SVNRevision.UNDEFINED;
                            if (externalEntry != null) {
                                externalsWCRevision = SVNRevision.create(externalEntry.getRevision());
                            }
                            SVNEntry ownerEntry = wcAccess.getEntry(localPath, false);
                            SVNURL ownerURL = null;
View Full Code Here

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

            SVNURL url = SVNURL.parseURIEncoded(srcURL);
            SVNUpdateClient updateClient = new SVNUpdateClient(getRepositoryPool(), getOptions());
            updateClient.setEventHandler(getEventDispatcher());

            File dstFile = new File(pair.myDst);
            SVNRevision srcRevision = pair.mySourceRevision;
            SVNRevision srcPegRevision = pair.mySourcePegRevision;
            updateClient.doCheckout(url, dstFile, srcPegRevision, srcRevision, SVNDepth.INFINITY, false);

            if (sameRepositories) {
                url = SVNURL.parseURIEncoded(pair.mySource);
View Full Code Here

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

            }
            if (isURL() && revStr.length() > 6 &&
                    revStr.toLowerCase().startsWith("%7b") && revStr.toLowerCase().endsWith("%7d")) {
                revStr = SVNEncodingUtil.uriDecode(revStr);
            }
            SVNRevision revision = SVNRevision.parse(revStr);
            if (revision != SVNRevision.UNDEFINED) {
                myPegRevision = revision;
                myTarget = myTarget.substring(0, index);
                return;
            }
View Full Code Here

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

        }
        if (copySource.isURL() && (copySource.getRevision() != null && copySource.getRevision().getID() == 10)) {
            return copySource;
        }

        SVNRevision pegRevision;
        SVNRevision revision;
        try {
            pegRevision = processCopySourceRevision(copySource.getPegRevision(), copySource, targetRevision);
            revision = processCopySourceRevision(copySource.getRevision(), copySource, targetRevision);
        } catch (SVNException e) {
            SVNDebugLog.getDefaultLog().logFine(SVNLogType.WC, "merge ext: Error while fetching copy source revision");
View Full Code Here

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

            }

            updateWCMergeInfo = Boolean.TRUE.toString().equals(reader.readLine());

            String path = reader.readLine();
            SVNRevision pegRevision = SVNRevision.parse(reader.readLine());
            SVNRevision revision = SVNRevision.parse(reader.readLine());
            reader.readLine();

            if (path.length() == 0) {
                copySource = null;
            } else if (SVNPathUtil.isURL(path)) {
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.