When we first tested the Review Board hook in the hg review repo, it successfully filed review requests, but the resulting diffs were partially broken. See https://reviewboard-dev.allizom.org/r/23/diff/ for an example. There are two theories: that there are problems with hg diffs (which the rbt command-line tool has worked around), and that there's a bug in Review Board itself (possibly https://code.google.com/p/reviewboard/issues/detail?id=3312).
May be relevant: https://code.google.com/p/reviewboard/issues/detail?id=895
I was able to reproduce this (or similar) bug using latest ReviewBoard + RBTools: https://gist.github.com/laggyluke/cf1c8885948621a4afa2 If even "rbt post" fails, I'm not sure we can work around it in the hook. Mark, any advice?
Guh that's frightening. Maybe smacleod has some ideas. Unless you have something misconfigured, seems like we really need this fixed upstream.
I think this is worth bringing up on the Review Board mailing list too.
Some discussion is happening here: https://groups.google.com/forum/#!topic/reviewboard/zYCShV-nK7s
This bug turned out to be caused by Mercurial client misconfiguration (diffs were generated with --git flag) and incorrect parent diff generation. The fix is in master: https://github.com/laggyluke/reviewboard-mercurial-hook/commit/aedb4171666de5656e9994f1b23724549b45fc9a
Seems good on reviewboard-dev.