assertTrue("[sanity]", f1.canWrite());
HgServer server = new HgServer().start(dstRepoLoc);
try {
final HgLookup hgLookup = new HgLookup();
final HgRepository srcRepo = hgLookup.detect(srcRepoLoc);
final HgRemoteRepository dstRemote = hgLookup.detect(server.getURL());
new HgCheckoutCommand(srcRepo).changeset(6).clean(true).execute();
assertEquals("[sanity]", "with-merge", srcRepo.getWorkingCopyBranchName());
RepoUtils.modifyFileAppend(f1, "change1");
new HgCommitCommand(srcRepo).message("Commit 1").execute();
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();
}
}