Examples of HgOutgoingCommand


Examples of org.tmatesoft.hg.core.HgOutgoingCommand

    if (hgRemote.isInvalid()) {
      System.err.printf("Remote repository %s is not valid", hgRemote.getLocation());
      return;
    }
    //
    HgOutgoingCommand cmd = hgRepo.createOutgoingCommand();
    cmd.against(hgRemote);
   
    // find all local children of commonKnown
    List<Nodeid> result = cmd.executeLite();
    dump("Lite", result);
    //
    //
    System.out.println("Full");
    // show all, starting from next to common
    final ChangesetDumpHandler h = new ChangesetDumpHandler(hgRepo.getRepository());
    h.complete(cmdLineOpts.getBoolean("--debug")).verbose(cmdLineOpts.getBoolean("-v", "--verbose"));
    cmd.executeFull(h);
    h.done();
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgOutgoingCommand

      final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
      cmd.destination(dstRemote);
      cmd.execute();
      final HgRepository dstRepo = hgLookup.detect(dstRepoLoc);
      checkRepositoriesAreSame(srcRepo, dstRepo);
      final List<Nodeid> outgoing = new HgOutgoingCommand(srcRepo).against(dstRemote).executeLite();
      errorCollector.assertTrue(outgoing.toString(), outgoing.isEmpty());
    } finally {
      server.stop();
    }
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgOutgoingCommand

      RepoUtils.modifyFileAppend(f1, "change2");
      new HgCommitCommand(srcRepo).message("Commit 2").execute();
      //
      new HgPushCommand(srcRepo).destination(dstRemote).execute();
      checkRepositoriesAreSame(srcRepo, hgLookup.detect(dstRepoLoc));
      final List<Nodeid> outgoing = new HgOutgoingCommand(srcRepo).against(dstRemote).executeLite();
      errorCollector.assertTrue(outgoing.toString(), outgoing.isEmpty());
    } finally {
      server.stop();
    }
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgOutgoingCommand

      File dest = RepoUtils.createEmptyDir("test-outgoing-" + x++);
      ExecHelper eh0 = new ExecHelper(new OutputParser.Stub(false), null);
      eh0.run("hg", "clone", hgRemote.getLocation(), dest.toString());
      eh0.cwd(dest);
      Assert.assertEquals("initial clone failed", 0, eh0.getExitValue());
      HgOutgoingCommand cmd = new HgOutgoingCommand(lookup.detect(dest)).against(hgRemote);
      LogOutputParser outParser = new LogOutputParser(true);
      ExecHelper eh = new ExecHelper(outParser, dest);
      HgLogCommand.CollectHandler collector = new HgLogCommand.CollectHandler();
      //
      cmd.executeFull(collector);
      List<Nodeid> liteResult = cmd.executeLite();
      eh.run("hg", "outgoing", "--debug", hgRemote.getLocation());
      TestIncoming.report(collector, outParser, liteResult, errorCollector);
      //
      File f = new File(dest, "Test.txt");
      RepoUtils.createFile(f, "1");
      eh0.run("hg", "add");
      eh0.run("hg", "commit", "-m", "1");
      RepoUtils.modifyFileAppend(f, "2");
      eh0.run("hg", "commit", "-m", "2");
      //
      cmd = new HgOutgoingCommand(lookup.detect(dest)).against(hgRemote);
      cmd.executeFull(collector = new HgLogCommand.CollectHandler());
      liteResult = cmd.executeLite();
      outParser.reset();
      eh.run("hg", "outgoing", "--debug", hgRemote.getLocation());
      TestIncoming.report(collector, outParser, liteResult, errorCollector);
    }
  }
View Full Code Here

Examples of org.tmatesoft.hg.core.HgOutgoingCommand

      new HgCheckoutCommand(srcRepo).changeset(5).clean(true).execute();
      assertEquals("[sanity]", "no-merge", srcRepo.getWorkingCopyBranchName());
      RepoUtils.modifyFileAppend(f1, "change2");
      new HgCommitCommand(srcRepo).message("Commit 2").execute();
      //
      HgOutgoingCommand cmd = new HgOutgoingCommand(srcRepo).against(dstRemote);
      LogOutputParser outParser = new LogOutputParser(true);
      ExecHelper eh = new ExecHelper(outParser, srcRepoLoc);
      HgLogCommand.CollectHandler collector = new HgLogCommand.CollectHandler();
      //
      List<Nodeid> liteResult = cmd.executeLite();
      cmd.executeFull(collector);
      eh.run("hg", "outgoing", "--debug", dstRemote.getLocation());
      TestIncoming.report(collector, outParser, liteResult, errorCollector);
    } finally {
      server.stop();
    }
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.