HgLogCommand cmd = new HgLogCommand(hgRepo);
for (String u : cmdLineOpts.getList("-u", "--user")) {
cmd.user(u);
}
for (String b : cmdLineOpts.getList("-b", "--branches")) {
cmd.branch(b);
}
int limit = cmdLineOpts.getSingleInt(-1, "-l", "--limit");
if (limit != -1) {
cmd.limit(limit);
}