394: if a diff includes a file that has been cvs remove'd, reviewboard won't accept it
- Fixed
- Review Board
tim****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
chipx86 | |
June 30, 2010 |
If you cvs remove a file and then do a cvs diff -N to create the patch, reviewboard will say "The file '...' could not be found in the repository" and refuse to open the review request.
This happens to all reviews containing files actually not being visible any more at the location where they were when the review was created. Causing situations: - A review is created containing new files created on a branch not being HEAD, and the new files are merged into HEAD afterwords: The new files are placed in "Attic" first by CVS and then moved away from "Attic" on making them present in HEAD. - A review is created containing a file which is deleted from HEAD afterwords (like originally written here): The file is moved to "Attic" on CVS and not visible anymore on the original location. Reviews having this problem are not editable any more: They cannot be discarded, nor can they be set to Submitted to clean My Dashboard. IMHO that is an annoying bug having higher priority than "medium". ReviewBoard *should* ignore files not visible any more *or* try to locate them in the corresponding Attic (or just outside if they were inside originally). Anyway the review should at least open for editing it as a whole.
If we fail to find it, we should just check in Attic next before giving up. Probably an easy patch if someone wants to give it a shot.
I thought though that if you accessed a file that has since moved to Attic, but you accessed it with a revision number from when it wasn't in Attic, that it would find and fetch the file?
However both causing situations should just be checked by the developer(s) willing to do something about it. I put a HTML attachment here with "case 1", which is: File is originally added and edited for some steps on a branch not being HEAD, a review is created in this situation, and THEN the file is merged onto HEAD. (In a multi-branch development environment that's not that unusual.) btw the file is kind of "anonymous" now, but I really was surprised what is inside this error report page but not visible at all...
-
+
Hello alltogether, I just wrote a patch for the file scmtools/cvs.py This patch will fix that issue. Regards, Torsten Flatter
-
+
Done: http://reviews.review-board.org/r/555/
I'm having this same issue in ReviewBoard 1.5 beta 2. Was this fix ever applied/accepted?
Whoops sorry - I'm on 1.0.8, not 1.5.
As mentioned above I seem to be having this same issue with ReviewBoard 1.0.8 and a CVS project. Please let me know if I should file this as a separate issue. Attached is the output from running post-review with the --output-diff switch. Note I've edited out the empty output from CVS like "cvs diff: Diffing web/css" for directories in which there were no change. The diff should show that I removed one file (build.properties) and edited two others. The output from attempting to upload this change to reviewboard with post-review is: >>> HTTP POSTing to http://localhost/reviewboard/api/json/reviewrequests/new/: {'repository_path': 'cvshost:/cvsroot/gotoaudio'} >>> Review request created >>> Attempting to set field 'summary' to 'g2atest 2' for review request '32' >>> HTTP POSTing to http://localhost/reviewboard/api/json/reviewrequests/32/draft/set/: {'summary': 'g2atest 2'} >>> Uploading diff, size: 14196 >>> HTTP POSTing to http://localhost/reviewboard/api/json/reviewrequests/32/diff/new/: {} >>> Got API Error 207 (HTTP code 200): The file was not found in the repository >>> Error data: {u'stat': u'fail', u'file': u'build.properties', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u'1.8'} Error uploading diff Your review request still exists, but the diff is not attached. Is there any other data I could supply which would be useful to help troubleshoot this?
-
+
Looks like we need to make sure when we see the "+++ /dev/null" line that we should mark the file as deleted and not attempt to open it.
-
- Fixed + Confirmed -
- PendingReview + Milestone-Release1.5
Actually, that won't be good enough. We really do need the full file path. cvs really should be showing the full path information. The fact that it's not is bad, and we need to investigate how long this has been happening and figure out if there's a fix for it.
Been poking at this. Since the problem is that the RCS File line doesn't contain any information on which module the file is in, we may have to post-process the diff in post-review. Another option is to finally give Review Board a concept of "deleted files", but that's potentially a larger change. This appears to be a conscious choice on behalf of cvs: /* This is fullname, not file, possibly despite the POSIX.2 * specification, because that's the way all the Larry Wall * implementations of patch (are there other implementations?) want * things and the POSIX.2 spec appears to leave room for this. */
-
- Component-SCMTools + Component-DiffViewer + Component-DiffParser -
+ chipx86
That wasn't too bad.. I have a patch up for review at http://reviews.reviewboard.org/r/1685/
-
- Confirmed + PendingReview