Edgewall Software

Ticket #1930 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Revision log is broken when trying to view the root of a virtual repository

Reported by: sean.dawson@… Owned by: cboos
Priority: highest Milestone: 0.9
Component: version control/log view Version: devel
Severity: normal Keywords:
Cc:

Description

I've set my trac.ini as follows:

repository_dir = /some/path/to/repo/project1

where /some/path/to/repo is the physical path of my repository, and project1 is a versioned directory inside the repository. Clicking "Browse Source" correctly displays project1 as the new root, but clicking "Revision Log" results in an error:

The file or directory '/' doesn't exist at revision xxx or at any previous revision.

Note: the revision log works properly for any path under root; only for root does it give the error. I tried to dig around and determine if the scope wasn't being added properly, but I didn't look very hard :)

Attachments

scoped_get_path_history.patch (15.6 KB) - added by cboos 3 years ago.
get_path_history now takes into account the repository scope

Change History

Changed 3 years ago by cmlenz

  • status changed from new to closed
  • resolution set to duplicate
  • milestone 0.9 deleted

I think this is a duplicate of #1830. I've not yet seen any problems with subsets of a repository that are fully self-contained, but have seen exactly the problem you're reporting with those that aren't.

Maybe the root directory in this case was copied from a path outside the scope?

Anyway, can you test the patch attached to #1830 and see if that fixes the problem for you?

Changed 3 years ago by cmlenz

  • status changed from closed to reopened
  • resolution duplicate deleted
  • milestone set to 0.9

Just noticed that I'm seeing this problem at my own site, and it's not because the selected repository subset is not self-contained.

Changed 3 years ago by Manuzhai

#2046 is a duplicate of this one. It has the relevant traceback from the Trac log.

Changed 3 years ago by cboos

get_path_history now takes into account the repository scope

Changed 3 years ago by cboos

  • owner changed from jonas to cboos
  • priority changed from normal to highest
  • status changed from reopened to new

I've attached a fix, which also contains a big bunch of unit-tests for the scoped repository situation.

Changed 3 years ago by cmlenz

cboos, that patch looks good and works for me. Nice work! Feel free to check this in.

Changed 3 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Thanks! Patch applied in r2311.

Add/Change #1930 (Revision log is broken when trying to view the root of a virtual repository)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.