Examples of GitCommit


Examples of com.caucho.env.git.GitCommit

        log.finest(this + " valid " + type + " " + sha1);

      return true;
    }
    else if (type == GitType.COMMIT) {
      GitCommit commit = readCommit(sha1);

      if (commit == null)
        return false;

      return validateHash(commit.getTree());
    }
    else if (type == GitType.TREE) {
      GitTree tree = readTree(sha1);

      for (GitTree.Entry entry : tree.entries()) {
View Full Code Here

Examples of com.caucho.git.GitCommit

        log.finest(this + " valid " + type + " " + sha1);

      return true;
    }
    else if (type == GitType.COMMIT) {
      GitCommit commit = readCommit(sha1);

      if (commit == null)
        return false;

      return validateFile(commit.getTree());
    }
    else if (type == GitType.TREE) {
      GitTree tree = readTree(sha1);

      for (GitTree.Entry entry : tree.entries()) {
View Full Code Here

Examples of com.github.koraktor.mavanagaiata.git.GitCommit

    @Before
    public void setup() throws Exception{
        super.setup();

        GitCommit commit = mock(GitCommit.class);
        when(commit.getAuthorDate()).thenReturn(new Date(1162580880000L));
        when(commit.getAuthorEmailAddress()).thenReturn("john.doe@example.com");
        when(commit.getAuthorName()).thenReturn("John Doe");
        when(commit.getAuthorTimeZone()).thenReturn(TimeZone.getTimeZone("GMT"));
        when(commit.getCommitterDate()).thenReturn(new Date(1275131880000L));
        when(commit.getCommitterEmailAddress()).thenReturn("koraktor@gmail.com");
        when(commit.getCommitterName()).thenReturn("Sebastian Staudt");
        when(commit.getCommitterTimeZone()).thenReturn(TimeZone.getTimeZone("GMT+2"));
        when(commit.getId()).thenReturn("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef");

        when(this.repository.getAbbreviatedCommitId()).thenReturn("deadbeef");
        when(this.repository.getHeadCommit()).thenReturn(commit);
    }
View Full Code Here

Examples of com.github.koraktor.mavanagaiata.git.GitCommit

                walkAction.execute(this.mockCommit("Sebastian Staudt", "koraktor@gmail.com"));
                return null;
            }

            private GitCommit mockCommit(String authorName, String authorEmail) {
                GitCommit commit = mock(GitCommit.class);
                when(commit.getAuthorEmailAddress()).thenReturn(authorEmail);
                when(commit.getAuthorName()).thenReturn(authorName);
                when(commit.getAuthorDate()).thenReturn(new Date(dateCounter ++));
                return commit;
            }
        }).when(this.repository).walkCommits(any(GitContributorsMojo.ContributorsWalkAction.class));
    }
View Full Code Here

Examples of com.github.koraktor.mavanagaiata.git.GitCommit

     * @throws MavanagaiataMojoException if retrieving information from the Git
     *         repository fails
     */
    public void run() throws MavanagaiataMojoException {
        try {
            GitCommit commit = this.repository.getHeadCommit();
            String abbrevId  = this.repository.getAbbreviatedCommitId();
            String shaId     = commit.getId();
            boolean isDirty  = false;

            SimpleDateFormat dateFormat = new SimpleDateFormat(this.dateFormat);
            dateFormat.setTimeZone(commit.getAuthorTimeZone());
            String authorDate = dateFormat.format(commit.getAuthorDate());
            dateFormat.setTimeZone(commit.getCommitterTimeZone());
            String commitDate = dateFormat.format(commit.getCommitterDate());

            if (this.repository.isDirty(this.dirtyIgnoreUntracked)) {
                isDirty = true;

                if (this.dirtyFlag != null) {
                    abbrevId += this.dirtyFlag;
                    shaId    += this.dirtyFlag;
                }
            }

            this.addProperty("commit.abbrev", abbrevId);
            this.addProperty("commit.author.date", authorDate);
            this.addProperty("commit.author.name", commit.getAuthorName());
            this.addProperty("commit.author.email", commit.getAuthorEmailAddress());
            this.addProperty("commit.committer.date", commitDate);
            this.addProperty("commit.committer.name", commit.getCommitterName());
            this.addProperty("commit.committer.email", commit.getCommitterEmailAddress());
            this.addProperty("commit.id", shaId);
            this.addProperty("commit.sha", shaId);
            this.addProperty("commit.dirty", String.valueOf(isDirty));
        } catch (GitRepositoryException e) {
            throw MavanagaiataMojoException.create("Unable to read Git commit information", e);
View Full Code Here

Examples of com.github.koraktor.mavanagaiata.git.GitCommit

public class GitChangelogMojoTest extends GitOutputMojoAbstractTest<GitChangelogMojo> {

    protected List<GitCommit> mockCommits;

    private static GitCommit mockCommit(String id, String subject) {
        GitCommit commit = mock(GitCommit.class);
        when(commit.getId()).thenReturn(id);
        when(commit.getMessageSubject()).thenReturn(subject);
        return commit;
    }
View Full Code Here

Examples of git4idea.history.browser.GitCommit

                    GitRepository gitRepository = gitRepositoryOptional.get();

                    final VirtualFile virtualFile = gitRepository.getGitDir();

                    final String notLoaded = "Not loaded";
                    GitCommit gitCommit = new GitCommit(virtualFile, AbstractHash.create(revisionId), new SHAHash(revisionId), notLoaded, notLoaded, new Date(0), notLoaded,
                            notLoaded, Collections.<String>emptySet(), Collections.<FilePath>emptyList(), notLoaded,
                            notLoaded, Collections.<String>emptyList(), Collections.<String>emptyList(), Collections.<String>emptyList(),
                            Collections.<Change>emptyList(), 0);

                    cherryPick(gitRepository, gitCommit, git, platformFacade, project);
View Full Code Here

Examples of git4idea.history.browser.GitCommit

                    }
                    final List<Change> totalDiff;
                    CommitDiffBuilder.ChangesProvider changesProvider = new ChangesWithCommitMessageProvider(
                            gerritGitUtil, project, selectedChange);
                    if (gitCommits.size() == 1) {
                        final GitCommit gitCommit = Iterables.getLast(gitCommits);
                        totalDiff = changesProvider.provide(gitCommit);
                    } else {
                        GitCommit base = gitCommits.get(0);
                        GitCommit current = gitCommits.get(1);
                        totalDiff = new CommitDiffBuilder(base, current)
                                .withChangesProvider(changesProvider).getDiff();
                    }

                    ApplicationManager.getApplication().invokeLater(new Runnable() {
View Full Code Here

Examples of playRepository.GitCommit

            addIssueEvent(commit, cap.getProject(), cap.getUser());
        }
    }

    private void addIssueEvent(RevCommit commit, Project project, User user) {
        GitCommit gitCommit = new GitCommit(commit);
        String fullMessage = gitCommit.getMessage();
        Set<Issue> referredIssues = IssueEvent.findReferredIssue(fullMessage, project);
        String newValue = gitCommit.getId();

        for(Issue issue : referredIssues) {
            IssueEvent issueEvent = new IssueEvent();
            issueEvent.issue = issue;
            issueEvent.senderLoginId = user.loginId;
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.