Package org.tmatesoft.svn.core.internal.wc

Examples of org.tmatesoft.svn.core.internal.wc.SVNFileType


                continue;
            }
            if (!noIgnore && SVNStatusEditor.isIgnored(ignores, children[i].getName())) {
                continue;
            }
            SVNFileType childType = SVNFileType.getType(children[i]);
            if (childType == SVNFileType.DIRECTORY) {
                addDirectory(children[i], dir, force, noIgnore);
            } else if (childType != SVNFileType.UNKNOWN) {
                try {
                    addFile(children[i], childType, dir);
View Full Code Here


        if (entry == null) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNVERSIONED_RESOURCE, "Cannot revert: ''{0}'' is not under version control", path);
            SVNErrorManager.error(err);
        }
        if (entry.getKind() == SVNNodeKind.DIR) {
            SVNFileType fileType = SVNFileType.getType(path);
            if (fileType != SVNFileType.DIRECTORY && !entry.isScheduledForAddition()) {
                SVNEvent event = SVNEventFactory.createNotRevertedEvent(dir, entry);
                dispatchEvent(event);
                return false;
            }
        }
        if (entry.getKind() != SVNNodeKind.DIR && entry.getKind() != SVNNodeKind.FILE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Cannot revert ''{0}'': unsupported entry node kind", path);
            SVNErrorManager.error(err);
        }
        SVNFileType fileType = SVNFileType.getType(path);
        if (fileType == SVNFileType.UNKNOWN) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Cannot revert ''{0}'': unsupported node kind in working copy", path);
            SVNErrorManager.error(err);
        }
        boolean reverted = false;
View Full Code Here

            newEntryProperties.put(SVNProperty.shortPropertyName(SVNProperty.COPIED), null);
            reverted = true;
        }
        if (entry.getKind() == SVNNodeKind.FILE) {
            if (!reinstallWorkingFile) {
                SVNFileType fileType = SVNFileType.getType(dir.getFile(name));
                if (fileType == SVNFileType.NONE) {
                    reinstallWorkingFile = true;
                }
            }
            String basePath = SVNAdminUtil.getTextBasePath(name, false);
View Full Code Here

    public String doGetWorkingCopyID(final File path, String trailURL, final boolean committed) throws SVNException {
        SVNWCAccess wcAccess = createWCAccess();
        try {
            wcAccess.open(path, false, 0);
        } catch (SVNException e) {           
            SVNFileType pathType = SVNFileType.getType(path);
            if (pathType == SVNFileType.DIRECTORY) {
                return "exported";
            } else if (pathType == SVNFileType.NONE) {
                return null;
            }
View Full Code Here

     *                       addition, and SVNKit is not able to locate the copied
     *                       directory root for <code>src</code>
     *                       </ul>
     */
    public void doVirtualCopy(File src, File dst, boolean move) throws SVNException {
        SVNFileType srcType  = SVNFileType.getType(src);
        SVNFileType dstType  = SVNFileType.getType(dst);
       
        String opName = move ? "move" : "copy";
        if (move && srcType != SVNFileType.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_EXISTS, "Cannot perform 'virtual' {0}: ''{1}'' still exists", new Object[] {opName, src});
            SVNErrorManager.error(err);
View Full Code Here

        try {
            SVNAdminArea area = wcAccess.probeOpen(file, false, 0);
            if (area.getEntry(area.getThisDirName(), false) == null) {
                return false;
            }
            SVNFileType type = SVNFileType.getType(file);
            if (type.isFile() || type == SVNFileType.NONE) {
                // file or missing file
                return area.getEntry(file.getName(), false) != null;
            } else if (type != SVNFileType.NONE && !area.getRoot().equals(file)) {
                // directory, but not anchor. always considered unversioned.
                return false;
View Full Code Here

        return result[0];
    }

    private Map collectParentExternals(File path, File root) throws SVNException {
        Map externals = new HashMap();
        SVNFileType type = SVNFileType.getType(path);
        if (type != SVNFileType.DIRECTORY) {
            return externals;
        }
        File target = path;
        SVNWCAccess wcAccess = createWCAccess();
View Full Code Here

     *                                       created repository
     * @throws SVNException
     * @since                               1.1.1
     */
    public static SVNURL createLocalRepository(File path, String uuid, boolean enableRevisionProperties, boolean force, boolean pre14Compatible) throws SVNException {
        SVNFileType fType = SVNFileType.getType(path);
        if (fType != SVNFileType.NONE) {
            if (fType == SVNFileType.DIRECTORY) {
                File[] children = SVNFileListUtil.listFiles(path);
                if ( children != null && children.length != 0) {
                    if (!force) {
View Full Code Here

        try {
            status = client.doStatus(new File(path).getAbsoluteFile(), onServer);
        } catch (SVNException e) {
            if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) {
                File file = new File(path).getAbsoluteFile();
                SVNFileType ft = SVNFileType.getType(file);
                status = new SVNStatus(null, file, ft == SVNFileType.NONE ? SVNNodeKind.NONE : SVNNodeKind.UNKNOWN, null, null, null, null,
                        SVNStatusType.STATUS_UNVERSIONED, SVNStatusType.STATUS_NONE,
                        SVNStatusType.STATUS_NONE, SVNStatusType.STATUS_NONE,
                        false, false, false, null, null, null, null, null, null,
                        null, null, null);
View Full Code Here

     *                          </ul>
     */
    public SVNCommitInfo doImport(File path, SVNURL dstURL, String commitMessage, boolean useGlobalIgnores, boolean recursive) throws SVNException {
        // first find dstURL root.
        SVNRepository repos = null;
        SVNFileType srcKind = SVNFileType.getType(path);
        if (srcKind == SVNFileType.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_NOT_FOUND, "Path ''{0}'' does not exist", path);           
            SVNErrorManager.error(err);
        }
        List newPaths = new ArrayList();
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.wc.SVNFileType

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.