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

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


   * @return a list of pending Migrations since last {@link Equivalence} per migrationConfig
   */
  public static List<Migration> determineMigrations(
      ProjectContext context, MigrationConfig migrationConfig, Db db) {

    Repository fromRepo = context.repositories.get(migrationConfig.getFromRepository());
    EquivalenceMatchResult equivMatch = fromRepo.revisionHistory.findRevisions(
        null,  // Start at head.
        new EquivalenceMatcher(migrationConfig.getToRepository(), db));

    // TODO(user): Decide whether to migrate linear or graph history here. Once DVCS Writers
View Full Code Here


    HgCodebaseCreator cc = new HgCodebaseCreator(memoizedSupplier, rh, projectSpace, name, config);

    HgWriterCreator wc = new HgWriterCreator(freshSupplier, rh);

    return new Repository(name, rh, cc, wc);
  }
View Full Code Here

    GitCodebaseCreator cc = new GitCodebaseCreator(
        memoizedSupplier, rh, projectSpace, name, config);

    GitWriterCreator wc = new GitWriterCreator(freshSupplier, rh);

    return new Repository(name, rh, cc, wc);
  }
View Full Code Here

    String repositoryName = term.identifier;
    CodebaseCreator cc;
    if (repositoryName.equals("file")) {
      cc = new FileCodebaseCreator();
    } else {
      Repository repo = context.repositories.get(repositoryName);
      if (repo == null) {
        throw new CodebaseCreationError("no repository " + repositoryName);
      }
      cc = repo.codebaseCreator;
    }
View Full Code Here

   * checks out Repository myGitRepo at commit id a983ef and returns a Writer encapsulating it.
   *
   * @throws WritingError
   */
  public Writer createWriter(ProjectContext context) throws WritingError {
    Repository r = context.repositories.get(term.identifier);
    if (r == null) {
      throw new WritingError(String.format("no repository %s", term.identifier));
    }
    WriterCreator wc = r.writerCreator;

View Full Code Here

    SvnCodebaseCreator cc = new SvnCodebaseCreator(name, config, rh);

    SvnWriterCreator ec = new SvnWriterCreator(config, rh);

    return new Repository(name, rh, cc, ec);
  }
View Full Code Here

  @Override
  public int perform() {
    ProjectContext context;
    String toProjectSpace;
    RepositoryExpression toRepoEx, fromRepoEx;
    Repository toRepo;
    try {
      context = AppContext.RUN.contextFactory.makeProjectContext(options.configFilename);
      toRepoEx = Parser.parseRepositoryExpression(options.toRepository);
      fromRepoEx = Parser.parseRepositoryExpression(options.fromRepository);
      toRepo = context.repositories.get(toRepoEx.getRepositoryName());
View Full Code Here

    } catch (ParseError e) {
      AppContext.RUN.ui.error(e, "Couldn't parse " + options.fromRepository);
      return 1;
    }

    Repository r = context.repositories.get(repoEx.getRepositoryName());
    if (r == null) {
      AppContext.RUN.ui.error("No repository" + repoEx.getRepositoryName() + ".");
      return 1;
    }
View Full Code Here

    CodebaseCreator codebaseCreator = new DummyCodebaseCreator(repositoryName, projectSpace);

    WriterCreator writerCreator = new DummyWriterCreator(repositoryName);

    return new Repository(repositoryName, revisionHistory, codebaseCreator, writerCreator);
  }
View Full Code Here

    } catch (ParseError e) {
      AppContext.RUN.ui.error(e, "Couldn't parse " + options.repository);
      return 1;
    }

    Repository r = context.repositories.get(repoEx.getRepositoryName());
    if (r == null) {
      AppContext.RUN.ui.error("No repository " + repoEx.getRepositoryName());
      return 1;
    }
View Full Code Here

TOP

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

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.