Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNNodeKind


     */
    public static SVNNodeKind checkThePath( SVNRepository repository,
                                            String path,
                                            long revisionNumber,
                                            String sourceName ) {
        SVNNodeKind kind;
        try {
            kind = repository.checkPath(path, revisionNumber);

        } catch (SVNException e) {
            throw new RepositorySourceException(sourceName, e.getMessage());
View Full Code Here


     * @param repos
     * @return true if repository exist and false otherwise.
     */
    public static boolean exist( SVNRepository repos ) {
        try {
            SVNNodeKind kind = repos.checkPath("", -1);
            if (kind == SVNNodeKind.NONE) {
                return false;
            }
            return true;

View Full Code Here

     * @return true if repository path is a directory and false otherwise.
     */
    public static boolean isDirectory( SVNRepository repos,
                                       String path ) {
        try {
            SVNNodeKind kind = repos.checkPath(path, -1);
            if (kind == SVNNodeKind.DIR) {
                return true;
            }
        } catch (SVNException e) {
            return false;
View Full Code Here

     * @return true if the path is a file and false otherwise.
     */
    public static boolean isFile( SVNRepository repos,
                                  String path ) {
        try {
            SVNNodeKind kind = repos.checkPath(path, -1);
            if (kind == SVNNodeKind.FILE) {
                return true;
            }
        } catch (SVNException e) {
            return false;
View Full Code Here

        CheckArg.isNotEmpty(sourceName, "sourceName");
        assert availableWorkspaceNames != null;
        assert accessData != null;

        // Check if the default workspace is a folder.
        SVNNodeKind nodeKind = null;
        try {
            nodeKind = defaultWorkspace.checkPath("", -1);
            if (nodeKind == SVNNodeKind.NONE) {
                SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.UNKNOWN,
                                                               "No entry at URL ''{0}''",
View Full Code Here

                // Generate the properties for this File object ...
                PropertyFactory factory = getExecutionContext().getPropertyFactory();
                DateTimeFactory dateFactory = getExecutionContext().getValueFactories().getDateFactory();

                // Figure out the kind of node this represents ...
                SVNNodeKind kind = getNodeKind(workspaceRoot, requestedPath, accessData.getRepositoryRootUrl(), workspaceName);
                if (kind == SVNNodeKind.DIR) {
                    String directoryPath = getPathAsString(requestedPath);
                    if (!accessData.getRepositoryRootUrl().equals(workspaceName)) {
                        directoryPath = directoryPath.substring(1);
                    }
View Full Code Here

     * @param requestedPath
     * @return the kind.
     */
    protected SVNNodeKind validateNodeKind( SVNRepository repos,
                                            Path requestedPath ) {
        SVNNodeKind kind;
        String myPath;
        if (getPathAsString(requestedPath).trim().equals("/")) {
            myPath = getPathAsString(requestedPath);
        } else if (requestedPath.endsWith(JcrLexicon.CONTENT)) {
            myPath = getPathAsString(requestedPath.getParent());
View Full Code Here

    protected void addDirEntry( SVNRepository repository,
                                String root,
                                String child,
                                String message ) throws SVNException {
        assert root.trim().length() != 0;
        SVNNodeKind rootKind = repository.checkPath(root, -1);
        if (rootKind == SVNNodeKind.UNKNOWN) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN,
                                                         "path with name '{0}' is unknown in the repository",
                                                         root);
            throw new SVNException(err);
View Full Code Here

                             String rootPath,
                             String editedRoot,
                             String childSegmentName ) throws SVNException {
        openDirectories(editor, editedRoot);
        // test if so a directory does not exist.
        SVNNodeKind childKind = repos.checkPath(childSegmentName, -1);
        if (childKind == SVNNodeKind.NONE) {
            editor.addDir(childSegmentName, null, -1);
            closeDirectories(editor, childSegmentName);
            if (editedRoot != null) {
                closeDirectories(editor, editedRoot);
View Full Code Here

    @SuppressWarnings( "unused" )
    private void mkdir( SVNRepository repos,
                        String root,
                        String childName,
                        String message ) throws SVNException {
        SVNNodeKind childKind = repos.checkPath(childName, -1);
        if (childKind == SVNNodeKind.NONE) {
            ScmAction addNodeAction = addDirectory(root, childName);
            SVNActionExecutor executor = new SVNActionExecutor(repos);
            executor.execute(addNodeAction, message);
        } else {
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.SVNNodeKind

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.