Examples of SVNVersionedFile


Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

        // Path points to a File
        if (nodeKind == SVNNodeKind.FILE) {
            if (addEntry.getCopyPath() == null) {
                // This is a file that has been added just to the release, without being in the repository
                // (sometimes it happens for READMEs and build files)
                SVNVersionedFile file = (SVNVersionedFile) fModelMapper.createFile(addEntry.getPath());
                ModificationReport report =
                        fModelMapper.createModificationReport(logEntry.getDate(), logEntry.getMessage(), logEntry
                                .getAuthor());
                fModelMapper.createRevision(logEntry.getRevision(), file, changeSet, report, null, false, null);
            } else {
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

            SVNLogEntryPath logEntryPath,
            SVNLogEntry logEntry,
            Transaction changeSet,
            String movedFromPath) throws SVNImporterException {

        SVNVersionedFile file = (SVNVersionedFile) fModelMapper.createFile(logEntryPath.getPath());
        ModificationReport report;
        if ((logEntryPath.getType() == SVNLogEntryPath.TYPE_MODIFIED) && fCalculateLineChanges) {
            // Calculate line changes depending on user request and create the ModificationReport accordingly
            long prevRevisionNumber =
                    Long.parseLong(fModelMapper.getPreviousRevision(logEntryPath.getPath(), logEntry.getRevision()));
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

            String fromPath,
            long toRevNum,
            long fromRevNum) throws SVNImporterException {

        // I check whether I'm just adding a File (much faster) or a whole directory
        SVNVersionedFile fromFile = fFiles.get(fromPath);
        if (fromFile != null) {
            SVNVersionedFile newFile = (SVNVersionedFile) createFile(toPath);
            addFile(branch, release, changeSet, date, fromFile, newFile, message, author, toRevNum, fromRevNum);
        } else {
            // If it's not a file that is being added, it must be a directory, otherwise I throw an exception
            Directory dir = fDirectories.get(fromPath);
            if (dir != null) {
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

            Directory toIgnore) throws SVNImporterException {
        Directory directory = fDirectories.get(currDirPath);
        if (directory != null) {
            for (File unit : directory.getChildren()) {
                if (unit instanceof SVNVersionedFile) {
                    SVNVersionedFile newFile = (SVNVersionedFile) createFile(unit.getPath().replace(fromPath, toPath));
                    addFile(
                            branch,
                            release,
                            changeSet,
                            date,
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

                ModificationReport report = this.createModificationReport(creationTime, commitMessage, author);
                newRevision.setReport(report);

                // I also need to create a new File, as it is actually done by the SVN
                // It's the same of the old one, but with a different path
                SVNVersionedFile newFile = (SVNVersionedFile) createFile(newRevisionFileName);
                newRevision.setChangeSet(changeSet);
                changeSet.addRevision(newRevision); // Transaction -> SVNRevision
                newFile.addRevision(newRevision); // File -> SVNRevision
                newRevision.setFile(newFile); // SVNRevision -> File
                // Keep track of a new file ancestor
                newRevision.setAncestor(oldRevision);
                // I check whether I'm connecting the new SVNRevision to a Branch or to a Release
                if ((branch != null) && (release == null)) {
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

            Directory toIgnore) throws SVNImporterException {
        if (currDir != null) {
            for (File unit : currDir.getChildren()) {
                if (unit instanceof SVNVersionedFile) {

                    SVNVersionedFile newFile;
                    if (copyPath.compareTo("/") == 0) {
                        newFile = createFile(toPath + unit.getPath());
                    } else {
                        newFile = createFile(unit.getPath().replace(copyPath, toPath));
                    }
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

            if (fv.getPreviousRevision() != null) {
                fv.getPreviousRevision().setNextRevision(null);
                fPersistenceProvider.update(fv.getPreviousRevision());
            }
            SVNVersionedFile f = (SVNVersionedFile) fv.getFile();
            if (f.getCopiedFrom() != null) {
                ((SVNVersionedFile) f.getCopiedFrom()).setCopiedTo(null);
                fPersistenceProvider.update((SVNVersionedFile) f.getCopiedFrom());
            }
            Revision rev = f.getLatestRevision();
            if (Long.parseLong(rev.getNumber()) == revNum) {
                List<Revision> revs = f.getRevisions();
                revs.remove(f.getLatestRevision());
                f.setRevisions(revs);
                fPersistenceProvider.update(f);
            }
            if (branch != null) {
                Set<Revision> rs = branch.getRevisions();
                rs.remove(fv);
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

     * @return The File created, or the one found (if it exists already).
     * @see org.evolizer.model.resources.entities.fs.File
     * @see #createDirectory(String)
     */
    public SVNVersionedFile createFile(String fullPath) {
        SVNVersionedFile file = fFiles.get(fullPath);
        if (file == null) {
            file = new SVNVersionedFile(fullPath, null);
            String parentPath = getParentDirectoryPath(fullPath);
            Directory parent = fDirectories.get(parentPath);
            if (parent == null) {
                parent = createDirectory(parentPath);
            }
            file.setParentDirectory(parent); // SourceUnit -> Directory
            parent.add(file); // Directory -> SourceUnit
            if (fCachedRoot == null) {
                fFilesCache.add(file);
            }
            fFiles.put(fullPath, file);
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

            throw new SVNImporterException(MapperMessages.SVNModelMapper_cannotCreateRevision);
        } else if (deleted) {
            newRevision.setState(MapperMessages.SVNModelMapper_DELETED);
        } else if (copyPath != null) {
            // If copy path is not null, it means that the current file version is a copy from a preexisting file
            SVNVersionedFile originalFile = fFiles.get(copyPath);
            if (originalFile != null) {
                file.setCopiedFrom(originalFile);
                originalFile.setCopiedTo(file);
                // I get the latest version of the file we are copying from so that I can link to it
                // with the "ancestor" property
                newRevision.setAncestor((SVNRevision) originalFile.getLatestRevision());
                originalFile.getLatestRevision().setState(MapperMessages.SVNModelMapper_MOVED);
                fRevisionElemsCache.add(originalFile.getLatestRevision());
            } else {
                LOGGER.warn(NLS.bind(MapperMessages.SVNModelMapper_fileNotExists, file.getPath(), copyPath));
            }
        }
        // If branchName is not null, it means that the SVNRevision I'm creating is being committed to a branch, which
View Full Code Here

Examples of org.evolizer.versioncontrol.svn.model.entities.SVNVersionedFile

            for (Directory dir : toRemove) {
                fDirectories.remove(dir.getPath());
            }
            toRemove = null;
        } else {
            SVNVersionedFile file = fFiles.get(path);
            if (file != null) {
                // If it's a File I'll just proceed with its removal.
                removeRevisionFromRelease(file, release);
                // Remove the file to make some space
                fFiles.remove(path);
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.