4459: "File not found" when viewing a modified file which no longer exists as of the latest revision
- SetupIssue
- Review Board
cu | |
What version are you running?
2.5.6.1
What's the URL of the page containing the problem?
Private instance pointed at a private Subversion repository
What steps will reproduce the problem?
1) Create a file, post a review, commit as revision 1
Diff shows all lines being added.
2) Modify the file, post a review, commit as revision 2
Diff shows the modification.
3) Delete the file, post a review, commit as revision 3
Diff shows all lines being deleted.
4) Reload the review request from Step 2
Instead of showing modified lines, the following error is shown:
The file '("File not found: revision , path '/trunk/foo'", 160013)' could not be found in the repository This may be a bug in the software, a temporary outage, or an issue with the format of your diff. Please try again, and if you still have trouble, contact suppor5) Reload the review request from Step 3
Instead of showing the deleted lines (all of them), the same error above is shown.
What is the expected output? What do you see instead?
Review Board should show the diffs properly, even though the file no longer exists in revision 3. Note that they are displayed correctly before the file is removed in revision 3. When reproducing this, you have have to use Shift+Reload in your browser to avoid the cached diff showing up.
What operating system are you using? What browser?
Probably not relevant, but Ubuntu 14.04. Any browser.
Please provide any additional information below.
Not sure why Review Board should care whether the file exists in the most recent revision (or why it is even contacting Subversion just to display a review in the first place), my understanding is that it stores all diffs in its database anyway.
Sure. Assuming we've already made the change to the file "foo", I just do:
rbt post
rbt
reads.reviewboardrc
, which looks like this:REVIEWBOARD_URL = "https://review.example.net/" REPOSITORY = "testrepo"RBTools version is 0.7.5. Let me know if you need any more info.
Hmm. So what should be happening is that each time it uploads a diff, that diff contains revision information for the affected files, and then those revisions are fetched. The "latest" shouldn't matter at all.
Can you tell me how the repository is configured in the Review Board admin UI (maybe include a screenshot?), and if possible, could you make a change to a file and then upload the results of "rbt diff"?
The repository information is nothing too remarkable, note that we do see this across all of our SVN repositories:
Hosting service: (None - Custom Repository)
Repository type: Subversion
Path: svn+ssh://reviewboard@svn.example.net/testrepoI wrote a script to automate the creation of review requests to aid in the reproduction of this bug:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #!/usr/bin/env bash echo '<Creating foo>' echo 'This is a file named foo' > foo svn add foo rbt diff rbt post svn commit -m 'Add foo' echo '<Modifying foo>' echo 'This is a change to foo' >> foo rbt diff rbt post svn commit -m 'Modify foo' echo '<Deleting foo>' svn rm foo rbt diff rbt post svn commit -m "Delete foo" |
Here is the very lightly redacted output (including requested rbt diff):
<Creating foo> A foo Index: /trunk/foo =================================================================== --- /trunk/foo (nonexistent) +++ /trunk/foo (working copy) @@ -0,0 +1 @@ +This is a file named foo Review request #41765 posted. https://review.example.net/r/41765/ https://review.example.net/r/41765/diff/ Adding foo Transmitting file data .done Committing transaction... Committed revision 132. <Modifying foo> Index: /trunk/foo =================================================================== --- /trunk/foo (revision 132) +++ /trunk/foo (working copy) @@ -1 +1,2 @@ This is a file named foo +This is a change to foo Review request #41766 posted. https://review.example.net/r/41766/ https://review.example.net/r/41766/diff/ Sending foo Transmitting file data .done Committing transaction... Committed revision 133. <Deleting foo> D foo Index: /trunk/foo =================================================================== --- /trunk/foo (revision 133) +++ /trunk/foo (nonexistent) @@ -1,2 +0,0 @@ -This is a file named foo -This is a change to foo Review request #41767 posted. https://review.example.net/r/41767/ https://review.example.net/r/41767/diff/ Deleting foo Committing transaction... Committed revision 134.
When looking at the diffs in review requests 41766 and 41767, the following error is displayed:
The file '("File not found: revision 134, path '/trunk/foo'", 160013)' could not be found in the repository This may be a bug in the software, a temporary outage, or an issue with the format of your diff. Please try again, and if you still have trouble, contact support.
As you can see by the shell script and output, revision 134 didn't exist in Subversion when any of the review requests were posted.
Let me know if you need any further info.
Another thing I forgot to check earlier: The diffs for all three review requests can be downloaded and appear to be correct. It's just displaying them in the UI that doesn't work.
The problem goes away when using PySVN. Are there any downsides/caveats to using that over subvertpy? Our deployment sees pretty heavy daily use.
It's just a slightly more complicated installation procedure (since it's not in PyPI). No downsides once it's installed.