1376: post-review: --repository-url pointing to a file doesn't work
- UserError
- Review Board
niko****@prokosc******** (Google Code) (Is this you? Claim this profile.) | |
Jan. 4, 2010 |
What version are you running? 1.1a2 What steps will reproduce the problem? 1. Try to create a review with --repository- url=http://server/svn/path/to/file.txt 2. post-review will try to upload a diff with http://server/svn/path/to/file.txt/file.txt as filename, which wouldn't be found 3. --repository-url=http://server/svn/path/to/ performs ok, but possibly includes more files than needed. What is the expected output? What do you see instead? post-review should create a post-commit review for this one file Please provide any additional information below. Would be really nice if diffing single files would be possible without the need for the exact URL!
I don't understand. There's no way we could support passing a filename to --repository-url, because that doesn't make sense. --repository-url must point to the head of a repository, so that we can look it up on the server. You should be able to pass that to post-review and then specify the exact files you need as parameters, but I suppose in this case you're wanting to reference files that are on a remote SVN server, instead of locally?
-
+ NeedInfo
It makes perfect sense to me. A little explanation might be in order :) Use case: I've got a developer who'd like to have his committed changes to a file file.txt reviewed, let's say he started at revision 100 and finished at revision 150. There have been five commits, so his commits are probably at 100, 110, 120, 130, 140 and 150 -- but this doesn't really matter, it matters that there were no other changes to that file in the meantime, he's been the only developer. Now I've been asked how to create a review for that. Normally, "svn diff -r 100:150 file.txt" would generate a proper diff, however post-review doesn't support filenames for revision ranges. So I looked into documentation and notices -- repository-url parameter. Since in SVN every URL inside a repository may be checked out independently, I tried to use http://svn.server/svn/path/to/file.txt as repository URL. "post-review -d -n --revision-range=100:150 --repository- url=http://svn.server/svn/path/to/file.txt" ran without problems and has produced proper diff for that single file for revisions 100 to 150. It's only when post- review tried to submit that diff to Review Board that problems began. post-review replaced the "Info:" field in the diff with "http://svn.server/svn/path/to/file.txt/file.txt" (previously just "file.txt") assuming that filename in the diff should be attached to the base path given as -- repository-url. This is not really correct -- if the URL points to a file, that filename should be removed from the path between diffing and uploading to Review Board. In that case, filename gets attached properly and RB accepts the diff. That said, I fully understand that I might be bending RB's strain features quite a bit and would prefer doing this all properly. For that, I'd need a way to review changes to single files over several commits -- again, I know developer discipline is probably the Right Way (tm) to go, but my fellow developers don't even grasp the necessity for proper commit messages, not to mention proper atomic bundling of changes. I hope this explanation made it a bit clearer to you.