Edgewall Software
Modify

Ticket #1930 (closed defect: fixed)

Opened 5 years ago

Last modified 4 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 Download (15.6 KB) - added by cboos 4 years ago.
get_path_history now takes into account the repository scope

Change History

comment:1 Changed 5 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?

comment:2 Changed 5 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.

comment:3 Changed 4 years ago by Manuzhai

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

Changed 4 years ago by cboos

get_path_history now takes into account the repository scope

comment:4 Changed 4 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 Download, which also contains a big bunch of unit-tests for the scoped repository situation.

comment:5 Changed 4 years ago by cmlenz

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

comment:6 Changed 4 years ago by cboos

  • Status changed from new to closed
  • Resolution set to fixed

Thanks! Patch applied in r2311.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.