Here is my problem:
I got a remote mercurial repository where the hook is gonna be setup either incoming or changegroup, and I got a ReviewBoard setup on a different server. The idea is to automate review request tickets generation upon push from devs into the remote repository. Of course, I would need a hook that invoke post-review that also uses submit-as user which extracted using the mercurial api (ctx.user()), or else all the review requests tickets would be in the name of the user that connects the remote repository to the reviewboard server.
My main dilemma is actually getting the start revision and the stop revision , if I use incoming I'll be getting all changesets nodes but of course the hook is getting invoked everytime so there is no status kept between each invocation. On the other hand if I use changegroup I only get the first changeset and I cannot compare.As well for comparaison I need a way to keep the previous tip to send it to post-review basically :
post-review --revision-range=previoustip:newtip --submit-as=ctx.user()
If you got any ideas on how to solve the problem, I would be happy. I am writing the hook in python obviously.