Examples of GitImporterException


Examples of org.evolizer.versioncontrol.git.importer.exceptions.GitImporterException

                fTransactions.put(commit.getSha(), currTrans);
                try {
                    currTrans.setStarted(this.translateDateString(commit.getDateString()));
                    currTrans.setFinished(this.translateDateString(commit.getDateString()));
                } catch (ParseException e) {
                    throw new GitImporterException("Error while parsing a commit date:\n" + e.getMessage());
                }
                // List<String> res = commit.getMergeDetails();

                for (CommitFile commitFile : commit.getFiles()) {
                    LOGGER.debug("found file " + commitFile.getName());
View Full Code Here

Examples of org.evolizer.versioncontrol.git.importer.exceptions.GitImporterException

            props = getProperties();

            gitPath = props.getProperty("gitPath");

            if (gitPath == null || gitPath.compareTo("") == 0) {
                throw new GitImporterException("the git path was not set, check the importer settings file");
            }
        } catch (IOException e) {
            throw new GitImporterException("Error while reading the importer settings file");
        }

        // I set up the Git path right away
        try {
            JavaGitConfiguration.setGitPath(gitPath);
        } catch (IOException e) {
            throw new GitImporterException("Error while setting the git path: " + gitPath, e);
        } catch (JavaGitException e) {
            throw new GitImporterException("Error while setting the git path: " + gitPath, e);
        }
        fMonitor.worked(1);
        fMapper = new GITModelMapper(fSession);
       
        // Importing from a local (or pre-downloaded repository)
View Full Code Here

Examples of org.evolizer.versioncontrol.git.importer.exceptions.GitImporterException

        try {
            // I get the tags of the project. They are also known in other Version Control Systems as Releases.
            tags = (ArrayList<String>) fDotGit.getTags();
            fMonitor.beginTask("Importing revision history", tags.size() + 1);
        } catch (JavaGitException e) {
            throw new GitImporterException("Problems encountered while fetching all the git tags", e);
        } catch (IOException e) {
            throw new GitImporterException("Problems encountered while fetching all the git tags", e);
        }
        // For each tag/release I extract its history
        for (String tag : tags) {
            GitLogOptions options = new GitLogOptions();
            options.setOptSpecificTag(true, tag);
            options.setOptFileDetails(true);
            options.setOptOrderingReverse(true);
            options.setOptLimitNoMerges(true); // Don't care about merges for now
            options.setOptFileChangeType(true);
            try {
                fMonitor.subTask("Extracting history for tag " + tag);
                handleRelease(options, tag);
                fMonitor.worked(1);
            } catch (JavaGitException e) {
                throw new GitImporterException("Problems encountered while importing git history for release " + tag, e);
            } catch (IOException e) {
                throw new GitImporterException("Problems encountered while importing git history for release " + tag, e);
            }
        }
        if (!tags.isEmpty()) {
            fMonitor.subTask("Saving the data");
            fMapper.saveModel();
        } else {
            throw new GitImporterException("The GIT repository contains no tags therefore no history could be extracted");
        }
        fMonitor.worked(1);
        fMonitor.done();
        LOGGER.debug("Repository " + fGitRepositoryLocation + " imported successfully");
    }
View Full Code Here

Examples of org.evolizer.versioncontrol.git.importer.exceptions.GitImporterException

                if (commit.getFiles() != null) {
                    if (fFetchSrc) {
                        Map<String, String> filesContent = new HashMap<String, String>();
                        for (CommitFile f : commit.getFiles()) {
                            if (f.getChangeType() == null) {
                                throw new GitImporterException(
                                        "Found a file that had no change type (all the files must be marked as either Modified, Deleted or Added) ");
                            }
                            if (f.getChangeType().compareTo("A") == 0 || f.getChangeType().compareTo("M") == 0) {
                               
                                String fileContents = getFileContents(f.getName(), commit.getSha());
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.