2824: post-review does not detect renames
- NotABug
- Review Board
matthew********@kitwa****** (Google Code) (Is this you? Claim this profile.) | |
Dec. 13, 2012 |
What version are you running? RBTools 0.4.2 Not sure how to easily reproduce this... for git repositories, post-review uploads diffs with deleted and created files when renames are non-trivial (i.e. 'git diff' with no options does not show a rename). I think post-review should be passing '-C -C' to 'git diff' to do better rename detection.
This requires rename support server-side, and that's only in the upcoming Review Board 1.7 release.
-
+ NotABug
Ah, I thought I'd read somewhere it was in 1.6.x also. I guess this means post-review should have a way of knowing the server version, since not everyone will upgrade immediately. Is there a good way to do that? Alternatively, could post-review read e.g. a git configure option whether or not to use rename detection? I hit this on a diff that was primarily a refactoring, that would have been very hard to review without rename detection... I had to locally modify RBTools to get a reasonable diff.
Also, I have discovered that copy support seems to not exist in 1.7 rc1 either? (So I guess for now it would be -M, not -C -C...)
post-review checks a list of server-side capabilities to know whether or not it can do move support, and factors that in. Right now, only Git supports any of those. We never added any of this to 1.6.x though. There's no copy support, though. That would be a good thing to add, but we should have another feature request for that so it's easier to track outside of a bug report. Hopefully the move stuff is working correctly in 1.7rc1 though?
The server support seems to work. (I didn't poke it hard... more taking for granted that it does as I haven't seen it *not* work. I have had diffs with renames on it, though, and haven't noticed any issues.) The problem is that post-review (RBTools 0.4.2) is not generating diffs with rename tracking.
I'm thinking something like the attached patch is what is needed, except it isn't immediately obvious how to propogate the server version to where it is needed.
-
+