Examples of SVNEventAction


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

     */
    public void handleEvent(SVNEvent event, double progress) {
        /*
         * Gets the current action. An action is represented by SVNEventAction.
         */
        SVNEventAction action = event.getAction();
        if (action == SVNEventAction.ADD){
            /*
             * The item is scheduled for addition.
             */
            System.out.println("A     " + event.getFile());
View Full Code Here

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

        /*
         * Gets the current action. An action is represented by SVNEventAction.
         * In case of an update an  action  can  be  determined  via  comparing
         * SVNEvent.getAction() and SVNEventAction.UPDATE_-like constants.
         */
        SVNEventAction action = event.getAction();
        String pathChangeType = " ";
        if (action == SVNEventAction.UPDATE_ADD) {
            /*
             * the item was added
             */
 
View Full Code Here

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

        /*
         * Gets the current action. An action is represented by SVNEventAction.
         * In case of a commit  an  action  can  be  determined  via  comparing
         * SVNEvent.getAction() with SVNEventAction.COMMIT_-like constants.
         */
        SVNEventAction action = event.getAction();
        if (action == SVNEventAction.COMMIT_MODIFIED) {
            System.out.println("Sending   " + event.getFile());
        } else if (action == SVNEventAction.COMMIT_DELETED) {
            System.out.println("Deleting   " + event.getFile());
        } else if (action == SVNEventAction.COMMIT_REPLACED) {
View Full Code Here

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

        if (file == null) {
            return;
        }
        String path = getPath(file);
        SVNStatusType type = SVNStatusType.INAPPLICABLE;
        SVNEventAction action = SVNEventAction.SKIP;
        SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE;

        SVNEntry entry = myWCAccess.getEntry(file, false);
        if (entry == null) {
            return;
        }
View Full Code Here

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

            }
        }

        protected void delete() throws SVNException {
            SVNStatusType type = SVNStatusType.INAPPLICABLE;
            SVNEventAction action = SVNEventAction.SKIP;
            SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE;

            SVNFileInfoExt fileInfo = (SVNFileInfoExt) myCurrentFile;
            final SVNNodeKind nodeKind = fileInfo.getNodeKind();

            SVNAdminArea dir = retrieveParent(myWCFile, true);
View Full Code Here

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

        myCurrentDirectory.loadFromRepository(revision);
    }

    public void deleteEntry(String path, long revision) throws SVNException {
        SVNStatusType type = SVNStatusType.INAPPLICABLE;
        SVNEventAction action = SVNEventAction.SKIP;
        SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE;
       
        SVNNodeKind nodeKind = myRepos.checkPath(path, myRevision1);
        SVNAdminArea dir = retrieve(myCurrentDirectory.myWCFile, true);
       
        if (myAdminArea == null || dir != null) {
View Full Code Here

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

    public void addDir(String path, String copyFromPath, long copyFromRevisionthrows SVNException {
        myCurrentDirectory = new SVNDirectoryInfo(myCurrentDirectory, path, true);
        myCurrentDirectory.myBaseProperties = new SVNProperties();
       
        SVNEventAction expectedAction = SVNEventAction.UPDATE_ADD;
        SVNEventAction action = expectedAction;
        SVNStatusType type = getDiffCallback().directoryAdded(path, myRevision2);
        if (type == SVNStatusType.MISSING || type == SVNStatusType.OBSTRUCTED) {
            action = SVNEventAction.SKIP;
        }
       
        if (myEventHandler != null) {
            boolean isReplace = false;
            KindActionState kas = (KindActionState) myDeletedPaths.get(myCurrentDirectory.myWCFile);
          if (kas != null) {
            SVNEventAction newAction = null;
            if (kas.myAction == SVNEventAction.UPDATE_DELETE && action == SVNEventAction.UPDATE_ADD) {
              isReplace = true;
              newAction = SVNEventAction.UPDATE_REPLACE;
            } else {
              newAction = kas.myAction;
View Full Code Here

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

        myCurrentDirectory.myPropertyDiff.put(name, value);
    }

    public void closeDir() throws SVNException {
        SVNStatusType type = SVNStatusType.UNKNOWN;
        SVNEventAction expectedAction = SVNEventAction.UPDATE_UPDATE;
        SVNEventAction action = expectedAction;
       
        if (myIsDryRun) {
            getDiffCallback().clearDeletedPaths();
        }
       
View Full Code Here

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

    public void textDeltaEnd(String commitPath) throws SVNException {
        myDeltaProcessor.textDeltaEnd();
    }

    public void closeFile(String commitPath, String textChecksum) throws SVNException {
        SVNEventAction expectedAction = myCurrentFile.myIsAdded ? SVNEventAction.UPDATE_ADD : SVNEventAction.UPDATE_UPDATE;
        SVNEventAction action = expectedAction;
        SVNStatusType[] type = {SVNStatusType.UNKNOWN, SVNStatusType.UNKNOWN};
        try {
            retrieveParent(myCurrentFile.myWCFile, myIsDryRun);
        } catch (SVNException e) {
            if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_LOCKED) {
                if (myEventHandler != null) {
                    action = SVNEventAction.SKIP;
                    SVNEvent event = SVNEventFactory.createSVNEvent(myCurrentFile.myWCFile,
                        SVNNodeKind.FILE, null, SVNRepository.INVALID_REVISION, SVNStatusType.MISSING,
                        SVNStatusType.UNKNOWN, null, action, expectedAction, null, null);
                    myEventHandler.handleEvent(event, ISVNEventHandler.UNKNOWN);
                }
                return;
            }
            throw e;
        }
        if (myCurrentFile.myFile != null || !myCurrentFile.myPropertyDiff.isEmpty()) {
            String baseMimeType = myCurrentFile.myBaseProperties.getStringValue(SVNProperty.MIME_TYPE);
            String mimeType = myCurrentFile.myPropertyDiff.getStringValue(SVNProperty.MIME_TYPE);
            if (myCurrentFile.myIsAdded) {
                type = getDiffCallback().fileAdded(commitPath,
                        myCurrentFile.myFile != null ? myCurrentFile.myBaseFile : null, myCurrentFile.myFile,
                        0, myRevision2, baseMimeType, mimeType,
                        myCurrentFile.myBaseProperties, myCurrentFile.myPropertyDiff);
            } else {
                type = getDiffCallback().fileChanged(commitPath,
                        myCurrentFile.myFile != null ? myCurrentFile.myBaseFile : null, myCurrentFile.myFile,
                        myRevision1, myRevision2, baseMimeType, mimeType,
                        myCurrentFile.myBaseProperties, myCurrentFile.myPropertyDiff);
            }
        }

      if (type[0] == SVNStatusType.MISSING || type[0] == SVNStatusType.OBSTRUCTED) {
            action = SVNEventAction.SKIP;
        } else if (myCurrentFile.myIsAdded) {
            action = SVNEventAction.UPDATE_ADD;
        } else {
            action = SVNEventAction.UPDATE_UPDATE;
        }
       
        if (myEventHandler != null) {
            boolean isReplace = false;
          KindActionState kas = (KindActionState) myDeletedPaths.get(myCurrentFile.myWCFile);
          if (kas != null) {
            SVNEventAction newAction = kas.myAction;
            if (kas.myAction == SVNEventAction.UPDATE_DELETE && action == SVNEventAction.UPDATE_ADD) {
              isReplace = true;
              newAction = SVNEventAction.UPDATE_REPLACE;
            }
                SVNEvent event = SVNEventFactory.createSVNEvent(myCurrentFile.myWCFile, kas.myKind, null,
View Full Code Here

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

        myCurrentDirectory.runLogs();
        maybeBumpDirInfo(myCurrentDirectory);
        if (!myCurrentDirectory.isSkipped && (myCurrentDirectory.isAddExisted || !myCurrentDirectory.IsAdded)) {
            if (!(adminArea == myAdminInfo.getAnchor() && !"".equals(myAdminInfo.getTargetName()))) {
                // skip event for anchor when there is a target.
                SVNEventAction action = myCurrentDirectory.isAddExisted || myCurrentDirectory.isExisted ? SVNEventAction.UPDATE_EXISTS : SVNEventAction.UPDATE_UPDATE;
                if (propStatus == SVNStatusType.UNKNOWN && action != SVNEventAction.UPDATE_EXISTS) {
                    action = SVNEventAction.UPDATE_NONE;
                }
                SVNEvent event = SVNEventFactory.createSVNEvent(adminArea.getRoot(), SVNNodeKind.DIR, null, myTargetRevision, SVNStatusType.UNKNOWN, propStatus, null, action, null, null, null);
                event.setPreviousRevision(myCurrentDirectory.myPreviousRevision);
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.