Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

#2110 closed defect (fixed)

Revision call error for a file that no longer exist...

Reported by: anonymous Owned by: Christian Boos
Priority: high Milestone: 0.9
Component: version control/log view Version: 0.8.4
Severity: minor Keywords: file view suppression
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When i'm looking for a suppressed file, i obtain a view of the last revision which contain this file. That's correct.

BUT. When i fill the revision form whith the next number of revision, instead of a page saying "the file no longer exists", the following page with errors appear.

Oops...
Trac detected an internal error:

("File not found: revision 29, path '/trunk/diffusion_repartie/src/rice/pastry/socket/SocketCollectionManager.java'", 160013)

If you think this really should work and you can reproduce it. Then you should consider to report this problem to the Trac team.

Go to http://trac.edgewall.com/ and create a new ticket where you describe the problem, how to reproduce it. Don't forget to include the python traceback found below.

TracGuide — The Trac User and Administration Guide
Python traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/core.py", line 531, in cgi_start
    real_cgi_start()
  File "/usr/lib/python2.3/site-packages/trac/core.py", line 526, in real_cgi_start
    dispatch_request(path_info, args, req, env)
  File "/usr/lib/python2.3/site-packages/trac/core.py", line 441, in dispatch_request
    module.run()
  File "/usr/lib/python2.3/site-packages/trac/Module.py", line 44, in run
    self.render()
  File "/usr/lib/python2.3/site-packages/trac/File.py", line 278, in render
    oh = svn.fs.node_history(root, self.path, self.pool)
SubversionException: ("File not found: revision 29, path '/trunk/diffusion_repartie/src/rice/pastry/socket/SocketCollectionManager.java'", 160013)


Attachments (1)

explicit_path_history_mode.patch (3.4 KB ) - added by Christian Boos 19 years ago.
Patch against r2326 improving the inlined patch and also modifying the revision log behavior so that it doesn't revert by itself to the path history mode when the requested path is not found

Download all attachments as: .zip

Change History (5)

comment:1 by Christian Boos, 19 years ago

Owner: changed from Jonas Borgström to Christian Boos
Priority: lownormal
Severity: normalminor
Status: newassigned

This works quite fine in the trunk (you'd get an error message).

What I'd like to add, however, is to add a link saying something like "Maybe that path was deleted, <search> for the last revision?".

  • browser.py

     
    8787        rev = req.args.get('rev')
    8888
    8989        repos = self.env.get_repository(req.authname)
    90         node = repos.get_node(path, rev)
     90        try:
     91            node = repos.get_node(path, rev)
     92        except TracError, e:
     93            ph_href = util.escape(self.env.href.log(path, rev=rev,
     94                                                    mode='path_history'))
     95            raise TracError(e.message +
     96                            '<br><a href="%s">Search</a> for an existing'
     97                            ' revision at that path.' % ph_href)
    9198
    9299        hidden_properties = [p.strip() for p
    93100                             in self.config.get('browser', 'hide_properties',

comment:2 by Christian Boos, 19 years ago

Btw, the log should behave the same, as reverting to path history mode can be quite time consuming: if I write: log:trunk/ComplexPath and want to check that it's the correct path by doing a preview and testing the link, I don't want to wait 1 minute before Trac tells me that the path doesn't exist.

On the other hand, when dereferencing an old link which used to be valid, having to option to search for the latest existing version of that path is worthwhile.

by Christian Boos, 19 years ago

Patch against r2326 improving the inlined patch and also modifying the revision log behavior so that it doesn't revert by itself to the path history mode when the requested path is not found

comment:3 by Christian Boos, 19 years ago

Component: generallog view
Milestone: 0.9
Priority: normalhigh

I think this patch would be a good thing to have for 0.9.

comment:4 by Christian Boos, 19 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in r2354

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.