if (hgRemote.isInvalid()) {
System.err.printf("Remote repository %s is not valid", hgRemote.getLocation());
return;
}
HgPullCommand cmd = hgRepo.createPullCommand();
cmd.source(hgRemote);
cmd.execute();
System.out.printf("Sent %d changesets\n", cmd.getPulledRevisions().size());
}
}