Package org.tmatesoft.svn.core.wc

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


        SVNRevision revision = (SVNRevision) myAttributes.get(SVNProperty.FILE_EXTERNAL_REVISION);
        return revision;
    }
   
    public SVNRevision getExternalFilePegRevision() {
        SVNRevision pegRevision = (SVNRevision) myAttributes.get(SVNProperty.FILE_EXTERNAL_PEG_REVISION);
        return pegRevision;
    }
View Full Code Here


                            null);
                    if (mergeInfoProp == null || mergeInfoProp.length() == 0 || mergeInfo.containsKey(mergeSrcChildPath)) {
                        hasMergeInfoFromMergeSrc = true;
                    } else {
                        SVNURL mergeInfoURL = mySourceRootURL.appendPath(mergeSrcChildPath, false);
                        SVNRevision pegRevision = SVNRevision.create(myRevision1 < myRevision2 ?
                                myRevision2 : myRevision1);
                        SVNErrorCode code = null;
                        SVNURL originalURL = null;
                        try {
                            originalURL = ensureSessionURL(myRepository, mergeInfoURL);
View Full Code Here

        boolean local = (revision == null || !revision.isValid() || revision.isLocal()) &&
                (pegRevision == null || !pegRevision.isValid() || pegRevision.isLocal());

        if (!local) {
            SVNWCAccess wcAccess = createWCAccess();
            SVNRevision wcRevision = null;
            SVNURL url = null;
            try {
                wcAccess.probeOpen(path, false, 0);
                SVNEntry entry = wcAccess.getVersionedEntry(path, false);
                url = entry.getSVNURL();
View Full Code Here

            public void handleStatus(SVNStatus status) {
                if (status.getEntryProperties() == null || status.getEntryProperties().isEmpty()) {
                    return;
                }
                if (status.getContentsStatus() != SVNStatusType.STATUS_ADDED) {
                    SVNRevision revision = committed ? status.getCommittedRevision() : status.getRevision();
                    if (revision != null) {
                        if (minRevision[0] < 0 || minRevision[0] > revision.getNumber()) {
                            minRevision[0] = revision.getNumber();
                        }
                        maxRevision[0] = Math.max(maxRevision[0], revision.getNumber());
                    }
                }
                switched[0] |= status.isSwitched();
                switched[1] |= status.getContentsStatus() != SVNStatusType.STATUS_NORMAL;
                switched[1] |= status.getPropertiesStatus() != SVNStatusType.STATUS_NORMAL &&
View Full Code Here

        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

                        boolean introduceVirtualExternalChange = false;
                        newExternals.clear();
                        for (int k = 0; k < externals.length; k++) {
                            File externalWC = new Resource(localPath, externals[k].getPath());
                            SVNEntry externalEntry = null;
                            SVNRevision externalsWCRevision = SVNRevision.UNDEFINED;

                            try {
                                wcAccess.open(externalWC, false, 0);
                                externalEntry = wcAccess.getEntry(externalWC, false);
                            } catch (SVNException svne) {
View Full Code Here

            if (entry.getURL() == null) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL, "''{0}'' has no URL", file);
                SVNErrorManager.error(err, SVNLogType.WC);
            }
            if (lock) {
                SVNRevision revision = stealLock ? SVNRevision.UNDEFINED : SVNRevision.create(entry.getRevision());
                lockInfo.put(entry.getSVNURL(), new LockInfo(file, revision));
            } else {
                if (!stealLock && entry.getLockToken() == null) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_MISSING_LOCK_TOKEN, "''{0}'' is not locked in this working copy", file);
                    SVNErrorManager.error(err, SVNLogType.WC);
View Full Code Here

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

            File dstFile = new Resource(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

                }

                final String[] targetPaths = {testPath};


                final SVNRevision svnRevision = SVNRevision.create(revision);
                return getSVNLogs(clientManager, targetPaths, svnRevision, start, limit);
            }

            @Override
            public StoreException handleException(final Exception e) throws StoreException {
View Full Code Here

    public String getLatestVersion() throws StoreException {
        return getSvnCore().doWithClientAndRepository(new SvnPersisterCore.SvnOperation<String>() {
            @Override
            public String execute(final SVNRepository repo, final SVNClientManager clientManager) throws Exception {
                final String[] targetPaths = {};
                final SVNRevision svnRevision = SVNRevision.HEAD;
                final SVNLogClient logClient = clientManager.getLogClient();
                final FilterableSVNLogEntryHandler handler = new FilterableSVNLogEntryHandler();

                // In order to get history is "descending" order, the startRevision should be the one closer to HEAD
                logClient.doLog(svnUrl, targetPaths, /* pegRevision */ SVNRevision.HEAD, svnRevision, SVNRevision.create(1),
View Full Code Here

TOP

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

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.