Package com.google.devtools.moe.client.repositories

Examples of com.google.devtools.moe.client.repositories.RevisionHistory


    Ui.Task t = AppContext.RUN.ui.pushTask(
        "diff_codebases",
        String.format("Diff codebases '%s' and '%s'", from.toString(), to.toString()));
    if (!CodebaseDifference.diffCodebases(from, to).areDifferent()) {
      RevisionHistory fromHistory = context.repositories.get(fromRepository).revisionHistory;
      RevisionHistory toHistory = context.repositories.get(toRepository).revisionHistory;

      // TODO(user): Pull highest revision from the created codebases, not over again (in case
      // head has moved forward meanwhile).
      db.noteEquivalence(new Equivalence(fromHistory.findHighestRevision(null),
                                         toHistory.findHighestRevision(null)));
    }
    AppContext.RUN.ui.popTask(t, "");
  }
View Full Code Here


   * processMigration() on each.
   */
  private static void updateCompletedMigrations(
      String fromRepository, String toRepository, Db db, ProjectContext context, boolean inverse) {

    RevisionHistory toHistory = context.repositories.get(toRepository).revisionHistory;
    EquivalenceMatchResult equivMatch = toHistory.findRevisions(
        null /*revision*/,
        new EquivalenceMatcher(fromRepository, db));

    List<Revision> linearToRevs = equivMatch.getRevisionsSinceEquivalence().getLinearHistory();
    AppContext.RUN.ui.info(String.format(
        "Found %d revisions in %s since equivalence (%s): %s",
        linearToRevs.size(),
        toRepository,
        equivMatch.getEquivalences(),
        Joiner.on(", ").join(linearToRevs)));

    for (Revision toRev : linearToRevs) {
      String fromRevId = getMigratedRevId(toHistory.getMetadata(toRev));
      if (fromRevId != null) {
        processMigration(new Revision(fromRevId, fromRepository), toRev, db, context, inverse);
      }
    }
  }
View Full Code Here

    if (r == null) {
      AppContext.RUN.ui.error("No repository" + repoEx.getRepositoryName() + ".");
      return 1;
    }

    RevisionHistory rh = r.revisionHistory;
    if (rh == null) {
      AppContext.RUN.ui.error("Repository " + r.name + " does not support revision history.");
      return 1;
    }

    Revision rev = rh.findHighestRevision(repoEx.getOption("revision"));

    List<Equivalence> lastEquivs = LastEquivalenceLogic.lastEquivalence(
        options.withRepository, rev, db, rh);

    if (lastEquivs.isEmpty()) {
View Full Code Here

    }
    if (projectSpace == null) {
      projectSpace = "public";
    }

    RevisionHistory revisionHistory = new DummyRevisionHistory(repositoryName);

    CodebaseCreator codebaseCreator = new DummyCodebaseCreator(repositoryName, projectSpace);

    WriterCreator writerCreator = new DummyWriterCreator(repositoryName);
View Full Code Here

    if (r == null) {
      AppContext.RUN.ui.error("No repository " + repoEx.getRepositoryName());
      return 1;
    }

    RevisionHistory rh = r.revisionHistory;
    if (rh == null) {
      AppContext.RUN.ui.error("Repository " + r.name + " does not support revision history.");
      return 1;
    }

    Revision rev = rh.findHighestRevision(repoEx.getOption("revision"));
    if (rev == null) {
      return 1;
    }

    AppContext.RUN.ui.info("Highest revision in repository \"" + r.name + "\": " + rev.revId);
View Full Code Here

TOP

Related Classes of com.google.devtools.moe.client.repositories.RevisionHistory

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.