Package com.google.devtools.moe.client.writer

Examples of com.google.devtools.moe.client.writer.DraftRevision


    control.replay();
    Codebase c = new Codebase(f("/codebase"), "public",
                              e("public", ImmutableMap.<String, String>of()));
    SvnWriter e = new SvnWriter(mockConfig, null, f("/writer"));
    DraftRevision r = e.putCodebase(c);
    control.verify();
    assertEquals("/writer", r.getLocation());
  }
View Full Code Here


  public void testWrongProjectSpace() throws Exception {
    Codebase c = new Codebase(f("/codebase"), "internal",
                              e("internal", ImmutableMap.<String, String>of()));
    SvnWriter e = new SvnWriter(mockConfig, null, f("/writer"));
    try {
      DraftRevision r = e.putCodebase(c);
      fail();
    } catch (MoeProblem p) {}
  }
View Full Code Here

    Codebase c = new Codebase(f("/codebase"), "public",
                              e("public", ImmutableMap.<String, String>of()));
    RevisionMetadata rm = new RevisionMetadata("rev1", "author", "data", "desc",
                                               ImmutableList.<Revision>of());
    SvnWriter e = new SvnWriter(mockConfig, null, f("/writer"));
    DraftRevision r = e.putCodebase(c, rm);
    control.verify();
    assertEquals("/writer", r.getLocation());
  }
View Full Code Here

  protected abstract void commitChanges(RevisionMetadata revMetaData) throws CommandException;

  @Override
  public DraftRevision putCodebase(Codebase incomingChangeCodebase, RevisionMetadata revMetaData)
      throws WritingError {
    DraftRevision draftRevision = putCodebase(incomingChangeCodebase);

    if (hasPendingChanges()) {
      try {
        commitChanges(revMetaData);
        AppContext.RUN.ui.info(
View Full Code Here

    // Expect no other mockFs calls from HgWriter.putFile().

    control.replay();

    HgWriter writer = new HgWriter(mockRevClone);
    DraftRevision draftRevision = writer.putCodebase(codebase);

    control.verify();

    assertEquals(WRITER_ROOT.getAbsolutePath(), draftRevision.getLocation());
  }
View Full Code Here

    expectHgCmd("add", "file1");

    control.replay();

    HgWriter writer = new HgWriter(mockRevClone);
    DraftRevision draftRevision = writer.putCodebase(codebase);

    control.verify();

    assertEquals(WRITER_ROOT.getAbsolutePath(), draftRevision.getLocation());
  }
View Full Code Here

    mockFs.copyFile(new File(CODEBASE_ROOT, "file1"), new File(WRITER_ROOT, "file1"));

    control.replay();

    HgWriter writer = new HgWriter(mockRevClone);
    DraftRevision draftRevision = writer.putCodebase(codebase);

    control.verify();

    assertEquals(WRITER_ROOT.getAbsolutePath(), draftRevision.getLocation());
  }
View Full Code Here

    expectHgCmd("rm", "file1");

    control.replay();

    HgWriter writer = new HgWriter(mockRevClone);
    DraftRevision draftRevision = writer.putCodebase(codebase);

    control.verify();

    assertEquals(WRITER_ROOT.getAbsolutePath(), draftRevision.getLocation());
  }
View Full Code Here

    control.replay();

    HgWriter writer = new HgWriter(mockRevClone);
    RevisionMetadata revisionMetadata =
        new RevisionMetadata("rev1", "author", "data", "desc", ImmutableList.<Revision>of());
    DraftRevision draftRevision = writer.putCodebase(codebase, revisionMetadata);

    control.verify();

    assertEquals(WRITER_ROOT.getAbsolutePath(), draftRevision.getLocation());
  }
View Full Code Here

    return new SvnDraftRevision(rootDirectory);
  }

  @Override
  public DraftRevision putCodebase(Codebase c, RevisionMetadata rm) throws WritingError {
    DraftRevision dr = putCodebase(c);
    // Generate a shell script to commit repo with author and description
    String script = String.format("svn update%n" +
                                  "svn commit -m \"%s\"%n" +
                                  "svn propset -r HEAD svn:author \"%s\" --revprop",
                                  rm.description, rm.author);
View Full Code Here

TOP

Related Classes of com.google.devtools.moe.client.writer.DraftRevision

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.