Package org.tmatesoft.svn.core.wc

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


            retrieveParent(myCurrentFile.myWCFile, myIsDryRun);
        } catch (SVNException e) {
            if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_LOCKED) {
                if (myEventHandler != null) {
                    action = SVNEventAction.SKIP;
                    SVNEvent event = SVNEventFactory.createMergeEvent(myAdminInfo, commitPath, action,
                            expectedAction, SVNStatusType.MISSING, SVNStatusType.UNKNOWN, SVNNodeKind.FILE);
                    myEventHandler.handleEvent(event, ISVNEventHandler.UNKNOWN);
                }
                return;
            }
            throw e;
        }
        if (myCurrentFile.myFile != null || !myCurrentFile.myPropertyDiff.isEmpty()) {
            String baseMimeType = (String) myCurrentFile.myBaseProperties.get(SVNProperty.MIME_TYPE);
            String mimeType = (String) myCurrentFile.myPropertyDiff.get(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 (myEventHandler != null) {
            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;
            }
            SVNEvent event = SVNEventFactory.createMergeEvent(myAdminInfo, commitPath, action,
                    expectedAction, type[0], type[1], SVNNodeKind.FILE);
            myEventHandler.handleEvent(event, ISVNEventHandler.UNKNOWN);
        }
    }
View Full Code Here


*/
public class SVNEventFactory {

    public static SVNEvent createMergeEvent(SVNAdminAreaInfo info, String path,
            SVNEventAction action, SVNEventAction expectedAction, SVNStatusType cType, SVNStatusType pType, SVNNodeKind kind) {
        SVNEvent event = new SVNEvent(info.getTarget().getRoot(), info.getTarget().getFile(path),
                action, expectedAction, kind, -1, null, cType, pType, null, null, null);
        event.setPath(path);
        return event;
    }
View Full Code Here

        return event;
    }

    public static SVNEvent createMergeEvent(SVNAdminAreaInfo info, File file,
            SVNEventAction action, SVNEventAction expectedAction, SVNStatusType cType, SVNStatusType pType, SVNNodeKind kind) {
        SVNEvent event = new SVNEvent(info.getTarget().getRoot(), file,
                action, expectedAction, kind, -1, null, cType, pType, null, null, null);
        return event;
    }
View Full Code Here

        return event;
    }

    public static SVNEvent createMergeEvent(SVNAdminAreaInfo info, SVNAdminArea dir, String path,
            SVNEventAction action, SVNStatusType cType, SVNStatusType pType, SVNNodeKind kind) {
        SVNEvent event = new SVNEvent(info, dir, SVNPathUtil.tail(path),
                action, kind, -1, null, cType, pType, null, null, null);
        event.setPath(path);
        return event;
    }
View Full Code Here

        return event;
    }

    public static SVNEvent createCommitEvent(File rootFile, File file,
            SVNEventAction action, SVNNodeKind kind, String mimeType) {
        return new SVNEvent(rootFile, file, action, kind, -1, mimeType,
                SVNStatusType.INAPPLICABLE, SVNStatusType.INAPPLICABLE,
                SVNStatusType.LOCK_INAPPLICABLE, null, null);
    }
View Full Code Here

                SVNStatusType.LOCK_INAPPLICABLE, null, null);
    }

    public static SVNEvent createCommitEvent(File rootFile, File file,
                                             SVNEventAction action, SVNNodeKind kind) {
        return new SVNEvent(rootFile, file, action, kind, -1, null,
                SVNStatusType.INAPPLICABLE, SVNStatusType.INAPPLICABLE,
                SVNStatusType.LOCK_INAPPLICABLE, null, null);
    }
View Full Code Here

                SVNStatusType.LOCK_INAPPLICABLE, null, null);
    }

    public static SVNEvent createSkipEvent(File rootFile, File file,
            SVNEventAction action, SVNEventAction expectedAction, SVNNodeKind kind) {
        return new SVNEvent(rootFile, file, action, expectedAction, kind, -1, null,
                SVNStatusType.INAPPLICABLE, SVNStatusType.INAPPLICABLE,
                SVNStatusType.LOCK_INAPPLICABLE, null, null);
    }
View Full Code Here

                SVNStatusType.LOCK_INAPPLICABLE, null, null);
    }

    public static SVNEvent createLockEvent(SVNAdminArea dir, String path,
            SVNEventAction action, SVNLock lock, SVNErrorMessage message) {
        SVNEvent event = new SVNEvent(null, dir, SVNPathUtil.tail(path), action, SVNNodeKind.FILE, -1, null, null, null, null, lock, message);
        event.setPath(path);
        return event;
    }
View Full Code Here

        event.setPath(path);
        return event;
    }
   
    public static SVNEvent createAnnotateEvent(String path, long revision) {
        SVNEvent event = new SVNEvent(null, null, SVNPathUtil.tail(path),
                SVNEventAction.ANNOTATE, SVNNodeKind.NONE, revision, null, null, null, null, null, null);
        event.setPath(path);
        return event;
    }
View Full Code Here

        try {
            mimeType = dir.getProperties(entry.getName()).getPropertyValue(SVNProperty.MIME_TYPE);
        } catch (SVNException e) {
            //
        }
        return new SVNEvent(info, dir, entry.getName(), SVNEventAction.ADD,
                entry.getKind(), 0, mimeType, null, null, null, null, null);

    }
View Full Code Here

TOP

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

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.