Package org.tmatesoft.svn.core.wc

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


    }

    public static void canDelete(File path, ISVNOptions options, final ISVNEventHandler eventHandler) throws SVNException {
        SVNStatusClient statusClient = new SVNStatusClient((ISVNAuthenticationManager) null, options);
        if (eventHandler != null) {
            statusClient.setEventHandler(new ISVNEventHandler() {
                public void checkCancelled() throws SVNCancelException {
                    eventHandler.checkCancelled();
                }

                public void handleEvent(SVNEvent event, double progress) throws SVNException {
View Full Code Here


                    if (SVNFileType.getType(mergedFile) != SVNFileType.DIRECTORY) {
                        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Cannot create directory ''{0}''", mergedFile);
                        SVNErrorManager.error(err, SVNLogType.DEFAULT);
                    }
                }
                ISVNEventHandler oldEventHandler = dir.getWCAccess().getEventHandler();
                dir.getWCAccess().setEventHandler(null);               
                SVNWCManager.add(mergedFile, dir, copyFromURL, copyFromRevision);
                dir.getWCAccess().setEventHandler(oldEventHandler);
            }
            return SVNStatusType.CHANGED;
        } else if (fileType == SVNFileType.DIRECTORY) {
            SVNEntry entry = getWCAccess().getEntry(mergedFile, false);
            if (entry == null || entry.isScheduledForDeletion()) {
                if (!myIsDryRun) {
                    ISVNEventHandler oldEventHandler = dir.getWCAccess().getEventHandler();
                    dir.getWCAccess().setEventHandler(null);               
                    SVNWCManager.add(mergedFile, dir, copyFromURL, copyFromRevision);
                    dir.getWCAccess().setEventHandler(oldEventHandler);
                }
                if (myIsDryRun) {
View Full Code Here

        if (dir == null) {
            return SVNStatusType.MISSING;
        }
        SVNFileType fileType = SVNFileType.getType(mergedFile);
        if (fileType == SVNFileType.DIRECTORY) {
            final ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler();           
            ISVNEventHandler handler = new ISVNEventHandler() {
                public void checkCancelled() throws SVNCancelException {
                    oldEventHandler.checkCancelled();
                }
                public void handleEvent(SVNEvent event, double progress) throws SVNException {
                }
View Full Code Here

        if (dir == null) {
            return SVNStatusType.MISSING;
        }
        SVNFileType fileType = SVNFileType.getType(mergedFile);
        if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) {
            ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler();
            getWCAccess().setEventHandler(null);
            try {
                delete(mergedFile, myIsForce, myIsDryRun);
            } catch (SVNException e) {
                return SVNStatusType.OBSTRUCTED;
View Full Code Here

    protected abstract String getCommandLineClientName();
   
    public void initClientManager() throws SVNException {
        myOptions = createClientOptions();
        myClientManager = SVNClientManager.newInstance(myOptions, createClientAuthenticationManager());
        myClientManager.setEventHandler(new ISVNEventHandler() {
            public void handleEvent(SVNEvent event, double progress) throws SVNException {
            }
            public void checkCancelled() throws SVNCancelException {
                AbstractSVNCommandEnvironment.this.checkCancelled();
            }
View Full Code Here

                    if (SVNFileType.getType(mergedFile) != SVNFileType.DIRECTORY) {
                        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Cannot create directory ''{0}''", mergedFile);
                        SVNErrorManager.error(err, SVNLogType.DEFAULT);
                    }
                }
                ISVNEventHandler oldEventHandler = dir.getWCAccess().getEventHandler();
                dir.getWCAccess().setEventHandler(null);               
                SVNWCManager.add(mergedFile, dir, copyFromURL, copyFromRevision);
                dir.getWCAccess().setEventHandler(oldEventHandler);
            }
            return SVNStatusType.CHANGED;
        } else if (fileType == SVNFileType.DIRECTORY) {
            SVNEntry entry = getWCAccess().getEntry(mergedFile, false);
            if (entry == null || entry.isScheduledForDeletion()) {
                if (!myIsDryRun) {
                    ISVNEventHandler oldEventHandler = dir.getWCAccess().getEventHandler();
                    dir.getWCAccess().setEventHandler(null);               
                    SVNWCManager.add(mergedFile, dir, copyFromURL, copyFromRevision);
                    dir.getWCAccess().setEventHandler(oldEventHandler);
                }
                if (myIsDryRun) {
View Full Code Here

        if (dir == null) {
            return SVNStatusType.MISSING;
        }
        SVNFileType fileType = SVNFileType.getType(mergedFile);
        if (fileType == SVNFileType.DIRECTORY) {
            final ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler();           
            ISVNEventHandler handler = new ISVNEventHandler() {
                public void checkCancelled() throws SVNCancelException {
                    oldEventHandler.checkCancelled();
                }
                public void handleEvent(SVNEvent event, double progress) throws SVNException {
                }
View Full Code Here

        if (dir == null) {
            return SVNStatusType.MISSING;
        }
        SVNFileType fileType = SVNFileType.getType(mergedFile);
        if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) {
            ISVNEventHandler oldEventHandler = getWCAccess().getEventHandler();
            getWCAccess().setEventHandler(null);
            try {
                delete(mergedFile, myIsForce, myIsDryRun);
            } catch (SVNException e) {
                return SVNStatusType.OBSTRUCTED;
View Full Code Here

                    }
                }
            }
        }
       
        SVNWCAccess baseAccess = SVNWCAccess.newInstance(new ISVNEventHandler() {
            public void handleEvent(SVNEvent event, double progress) throws SVNException {
            }
            public void checkCancelled() throws SVNCancelException {
                statusClient.checkCancelled();
            }
View Full Code Here

            }

            Collection changeLists = getSVNEnvironment().getChangelistsCollection();
            SVNWCClient client = getSVNEnvironment().getClientManager().getWCClient();
            final boolean[] deletedNonExistent = new boolean[] {false};
            client.setEventHandler(new ISVNEventHandler() {
                public void handleEvent(SVNEvent event, double progress) throws SVNException {
                    if (event.getAction() == SVNEventAction.PROPERTY_DELETE_NONEXISTENT) {
                        deletedNonExistent[0] = true;
                    }
                }
View Full Code Here

TOP

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

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.