Package com.google.devtools.moe.client

Examples of com.google.devtools.moe.client.CommandRunner.runCommand()


    }


    // revision 2 metadata
    try {
      expect(cmd.runCommand(
          "svn",
          ImmutableList.of("--no-auth-cache", "log", "--xml", "-l", "2", "-r", "2:1",
                           "http://foo/svn/trunk/"),
          "")).andReturn("<log><logentry revision=\"2\">" +
                             "<author>uid@google.com</author>" +
View Full Code Here


    AppContextForTesting.initForTest();
    IMocksControl control = EasyMock.createControl();
    CommandRunner cmd = control.createMock(CommandRunner.class);
    AppContext.RUN.cmd = cmd;

    expect(cmd.runCommand("svn", ImmutableList.of("--no-auth-cache", "log", "--xml", "-l", "2",
        "-r", "4:1", "http://foo/svn/trunk/"), ""))
        .andReturn("<log><logentry revision=\"4\">" +
                   "<author>uid@google.com</author>" +
                   "<date>yyyy-mm-dd</date>" +
                   "<msg>message</msg></logentry>" +
View Full Code Here

                   "<logentry revision =\"3\">" +
                   "<author>user@google.com</author>" +
                   "<date>zzzz-nn-ee</date>" +
                   "<msg>description</msg></logentry></log>");

    expect(cmd.runCommand("svn", ImmutableList.of("--no-auth-cache", "log", "--xml", "-l", "2",
        "-r", "3:1", "http://foo/svn/trunk/"), ""))
        .andReturn("<log><logentry revision=\"3\">" +
                   "<author>uid@google.com</author>" +
                   "<date>yyyy-mm-dd</date>" +
                   "<msg>message</msg></logentry>" +
View Full Code Here

    AppContextForTesting.initForTest();
    IMocksControl control = EasyMock.createControl();
    CommandRunner cmd = control.createMock(CommandRunner.class);
    AppContext.RUN.cmd = cmd;

    expect(cmd.runCommand("svn", ImmutableList.of("--no-auth-cache", "log", "--xml", "-l", "2",
        "-r", "2:1", "http://foo/svn/trunk/"), ""))
        .andReturn("<log><logentry revision=\"2\">" +
                   "<author>uid@google.com</author>" +
                   "<date>yyyy-mm-dd</date>" +
                   "<msg>message</msg></logentry>" +
View Full Code Here

                   "<logentry revision =\"1\">" +
                   "<author>user@google.com</author>" +
                   "<date>zzzz-nn-ee</date>" +
                   "<msg>description</msg></logentry></log>");

    expect(cmd.runCommand("svn", ImmutableList.of("--no-auth-cache", "log", "--xml", "-l", "2",
        "-r", "1:1", "http://foo/svn/trunk/"), ""))
        .andReturn("<log><logentry revision=\"1\">" +
                   "<author>uid@google.com</author>" +
                   "<date>yyyy-mm-dd</date>" +
                   "<msg>message</msg></logentry></log>");
View Full Code Here

    AppContext.RUN.fileSystem = mockFS;

    // Mock HgRepository.runHgCommand()
    CommandRunner cmd = control.createMock(CommandRunner.class);
    expect(
        cmd.runCommand(
            "hg",
            ImmutableList.<String>of(
                "clone",
                "--update=" + HgRevisionHistory.DEFAULT_BRANCH,
                repositoryURL,
View Full Code Here

    expect(fileSystem.exists(file1)).andReturn(true);
    expect(fileSystem.exists(file2)).andReturn(false);
    expect(fileSystem.isExecutable(file1)).andReturn(false);
    expect(fileSystem.isExecutable(file2)).andReturn(false);
    expect(cmd.runCommand("diff", ImmutableList.of("-N", "/1/foo", "/2/foo"), "")).andThrow(
        new CommandRunner.CommandException(
            "diff", ImmutableList.of("-N", "/1/foo", "/2/foo"), "foo", "", 1));

    control.replay();
    FileDifference d = FileDifference.CONCRETE_FILE_DIFFER.diffFiles("foo", file1, file2);
View Full Code Here

    expect(fileSystem.exists(file1)).andReturn(false);
    expect(fileSystem.exists(file2)).andReturn(true);
    expect(fileSystem.isExecutable(file1)).andReturn(false);
    expect(fileSystem.isExecutable(file2)).andReturn(false);
    expect(cmd.runCommand("diff", ImmutableList.of("-N", "/1/foo", "/2/foo"), "")).andThrow(
        new CommandRunner.CommandException(
            "diff", ImmutableList.of("-N", "/1/foo", "/2/foo"), "foo", "", 1));

    control.replay();
    FileDifference d = FileDifference.CONCRETE_FILE_DIFFER.diffFiles("foo", file1, file2);
View Full Code Here

    expect(fileSystem.isReadable(patchFile)).andReturn(true);
    fileSystem.makeDirsForFile(patcherRun);
    expect(fileSystem.isFile(codebaseFile)).andReturn(false);
    expect(fileSystem.listFiles(codebaseFile)).andReturn(new File[] {});

    expect(cmd.runCommand(
        "patch",
        ImmutableList.of("-p0",
                         "--input=/patchfile"),
        "/patcher_run_foo")).andReturn("");
View Full Code Here

    expect(fileSystem.exists(file1)).andReturn(true);
    expect(fileSystem.exists(file2)).andReturn(true);
    expect(fileSystem.isExecutable(file1)).andReturn(true);
    expect(fileSystem.isExecutable(file2)).andReturn(false);
    expect(cmd.runCommand("diff",
                          ImmutableList.of("-N", "/1/foo", "/2/foo"), "")).andReturn("");

    control.replay();
    FileDifference d = FileDifference.CONCRETE_FILE_DIFFER.diffFiles("foo", file1, file2);
    control.verify();
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.