Examples of ISVNEditor

@version 1.3 @author TMate Software Ltd. @since 1.2 @see ISVNReporterBaton @see Examples

Examples of org.apache.subversion.javahl.ISVNEditor

    public void dispose()
    {
        if (editorReference != null)
        {
            // Deactivate the open editor
            ISVNEditor ed = editorReference.get();
            if (ed != null)
            {
                ed.dispose();
                editorReference.clear();
            }
            editorReference = null;
        }
        if (reporterReference != null)
View Full Code Here

Examples of org.apache.subversion.javahl.ISVNEditor

                                      ISVNEditor.ProvidePropsCallback getProps,
                                      ISVNEditor.GetNodeKindCallback getCopyfromKind)
            throws ClientException
    {
        check_inactive(editorReference, reporterReference);
        ISVNEditor ed =
            CommitEditor.createInstance(this, revisionProperties,
                                        commitCallback, lockTokens, keepLocks,
                                        getBase, getProps, getCopyfromKind);
        if (editorReference != null)
            editorReference.clear();
View Full Code Here

Examples of org.apache.subversion.javahl.ISVNEditor

     */
    void disposeEditor(ISVNEditor editor)
    {
        if (editorReference == null)
            return;
        ISVNEditor ed = editorReference.get();
        if (ed == null)
            return;
        if (ed != editor)
            throw new IllegalStateException("Disposing unknown editor");
        editorReference.clear();
View Full Code Here

Examples of org.apache.subversion.javahl.ISVNEditor

    public void dispose()
    {
        if (editorReference != null)
        {
            // Deactivate the open editor
            ISVNEditor ed = editorReference.get();
            if (ed != null)
            {
                ed.dispose();
                editorReference.clear();
            }
            editorReference = null;
        }
        if (reporterReference != null)
View Full Code Here

Examples of org.apache.subversion.javahl.ISVNEditor

                                      ISVNEditor.ProvidePropsCallback getProps,
                                      ISVNEditor.GetNodeKindCallback getCopyfromKind)
            throws ClientException
    {
        check_inactive(editorReference, reporterReference);
        ISVNEditor ed =
            CommitEditor.createInstance(this, revisionProperties,
                                        commitCallback, lockTokens, keepLocks,
                                        getBase, getProps, getCopyfromKind);
        if (editorReference != null)
            editorReference.clear();
View Full Code Here

Examples of org.apache.subversion.javahl.ISVNEditor

     */
    void disposeEditor(ISVNEditor editor)
    {
        if (editorReference == null)
            return;
        ISVNEditor ed = editorReference.get();
        if (ed == null)
            return;
        if (ed != editor)
            throw new IllegalStateException("Disposing unknown editor");
        editorReference.clear();
View Full Code Here

Examples of org.tmatesoft.svn.core.io.ISVNEditor

            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN,
                                                         "path with name '{0}' is a file, you need a directory",
                                                         root);
            throw new SVNException(err);
        } else if (rootKind == SVNNodeKind.DIR) {
            ISVNEditor editor = repository.getCommitEditor(message, null, true, null);
            if (root.length() == 1 && root.charAt(0) == '/') {
                addProcess(repository, editor, root, "", child);
            } else {
                String rootPath = root.substring(1);
                addProcess(repository, editor, rootPath, null, child);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.ISVNEditor

            this.path = path;
        }

        public void applyAction( Object context ) throws SVNException {

            ISVNEditor editor = (ISVNEditor)context;

            openDirectories(editor, this.root);
            String[] paths = this.path.split("/");
            String newPath = this.root;
            for (int i = 0, length = paths.length; i < length; i++) {
                newPath = (newPath.length() != 0) ? newPath + "/" + paths[i] : paths[i];

                editor.addDir(newPath, null, -1);
            }

            closeDirectories(editor, path);
            closeDirectories(editor, this.root);
        }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.ISVNEditor

            this.file = file;
            this.content = content;
        }

        public void applyAction( Object context ) throws Exception {
            ISVNEditor editor = (ISVNEditor)context;
            openDirectories(editor, path);

            editor.addFile(path + "/" + file, null, -1);
            editor.applyTextDelta(path + "/" + file, null);
            SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
            String checksum = deltaGenerator.sendDelta(path + "/" + file, new ByteArrayInputStream(this.content), editor, true);
            editor.closeFile(path + "/" + file, checksum);

            closeDirectories(editor, path);

        }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.ISVNEditor

     * @param message
     * @throws SVNException
     */
    public void execute( ScmAction action,
                         String message ) throws SVNException {
        ISVNEditor editor = this.repository.getCommitEditor(message, null);
        editor.openRoot(-1);
        try {
            action.applyAction(editor);
        } catch (Exception e) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "This error is appeared: '{0}'", e.getMessage());
            throw new SVNException(err);
        }
        editor.closeDir();
        editor.closeEdit();

    }
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.