Examples of addCommit()


Examples of com.gitblit.models.DailyLogEntry.addCommit()

                } else {
                  linearParent = commit.getParents()[0].getId().getName();
                  digest.updateRef(branch, ReceiveCommand.Type.UPDATE, linearParent, commit.getName());
                }

                RepositoryCommit repoCommit = digest.addCommit(commit);
                if (repoCommit != null) {
                  List<RefModel> matchedRefs = allRefs.get(commit.getId());
                    repoCommit.setRefs(matchedRefs);

                    if (!ArrayUtils.isEmpty(matchedRefs)) {
View Full Code Here

Examples of com.gitblit.models.RefLogEntry.addCommit()

                              tags.put(dateStr, new DailyLogEntry(repositoryName, tagDate, tagUser));
                                }
                                RefLogEntry tagEntry = tags.get(dateStr);
                                tagEntry.updateRef(ref.getName(), ReceiveCommand.Type.CREATE);
                                RepositoryCommit rc = repoCommit.clone(ref.getName());
                                tagEntry.addCommit(rc);
                            } else if (ref.getName().startsWith(Constants.R_PULL)) {
                                // treat pull requests as special events in the log
                                if (!pulls.containsKey(dateStr)) {
                              UserModel commitUser = newUserModelFrom(ref.getAuthorIdent());
                              Date commitDate = commit.getAuthorIdent().getWhen();
View Full Code Here

Examples of com.gitblit.models.RefLogEntry.addCommit()

                              pulls.put(dateStr, new DailyLogEntry(repositoryName, commitDate, commitUser));
                                }
                                RefLogEntry pullEntry = pulls.get(dateStr);
                                pullEntry.updateRef(ref.getName(), ReceiveCommand.Type.CREATE);
                                RepositoryCommit rc = repoCommit.clone(ref.getName());
                                pullEntry.addCommit(rc);
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of com.gitblit.models.RefLogEntry.addCommit()

            continue;
          }
          try {
            List<RevCommit> pushedCommits = JGitUtils.getRevLog(repository, oldId, newId);
            for (RevCommit pushedCommit : pushedCommits) {
              RepositoryCommit repoCommit = log.addCommit(change.path, pushedCommit);
              if (repoCommit != null) {
                repoCommit.setRefs(allRefs.get(pushedCommit.getId()));
              }
            }
          } catch (Exception e) {
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.LogOp.addCommit()

                + numberFormat.format(numCommits) + " comits each created in " + sw.toString());
        System.err.flush();

        LogOp op = geogig.command(LogOp.class);
        for (ObjectId id : ids) {
            op.addCommit(id);
        }
        sw.reset().start();
        Iterator<RevCommit> commits = op.call();
        sw.stop();
        System.err.println("LogOp took " + sw.toString());
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.LogOp.addCommit()

        benchmarkIteration(commits);

        op = geogig.command(LogOp.class).setTopoOrder(true);
        for (ObjectId id : ids) {
            op.addCommit(id);
        }
        sw.reset().start();
        commits = op.call();
        sw.stop();
        System.err.println("LogOp using --topo-order took " + sw.toString());
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.LogOp.addCommit()

                Optional<ObjectId> commitId = geogig.command(RevParse.class).setRefSpec(commit)
                        .call();
                checkParameter(commitId.isPresent(), "Object not found '%s'", commit);
                checkParameter(geogig.getRepository().commitExists(commitId.get()),
                        "%s does not resolve to a commit", commit);
                op.addCommit(commitId.get());
            }
        }
        if (args.author != null && !args.author.isEmpty()) {
            op.setAuthor(args.author);
        }
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.LogOp.addCommit()

        final RevCommit c3 = geogig.command(CommitOp.class).setMessage("commit for " + idP3).call();
        insertAndAdd(lines1);
        final RevCommit c4 = geogig.command(CommitOp.class).setMessage("commit for " + idL1).call();

        LogOp op = geogig.command(LogOp.class);
        op.addCommit(c2.getId());
        op.addCommit(c4.getId());
        Iterator<RevCommit> iterator = op.call();
        assertNotNull(iterator);
        assertTrue(iterator.hasNext());
        assertEquals(c4, iterator.next());
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.LogOp.addCommit()

        insertAndAdd(lines1);
        final RevCommit c4 = geogig.command(CommitOp.class).setMessage("commit for " + idL1).call();

        LogOp op = geogig.command(LogOp.class);
        op.addCommit(c2.getId());
        op.addCommit(c4.getId());
        Iterator<RevCommit> iterator = op.call();
        assertNotNull(iterator);
        assertTrue(iterator.hasNext());
        assertEquals(c4, iterator.next());
        assertTrue(iterator.hasNext());
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.LogOp.addCommit()

                    list.remove(id);
                    list.add(id);// put the HEAD ref in the last position, to give it preference
                }
            }
            for (ObjectId id : list) {
                op.addCommit(id);
            }
        } else if (args.branch != null) {
            Optional<Ref> obj = geogig.command(RefParse.class).setName(args.branch).call();
            checkParameter(obj.isPresent(), "Wrong branch name: " + args.branch);
            op.addCommit(obj.get().getObjectId());
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.