Edgewall Software
Modify

Opened 16 years ago

Closed 14 years ago

Last modified 14 years ago

#7254 closed enhancement (fixed)

Add navigation (prev/next revision) to repo browser

Reported by: res@… Owned by: Remy Blank
Priority: normal Milestone: 0.12
Component: version control/browser Version: 0.11rc1
Severity: normal Keywords:
Cc: info@…, ryano@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This adds two navigation links to the source browser to quickly get to the previous or next revision of a file.

Attachments (3)

trac-rev-navigate.diff (1.3 KB ) - added by res@… 16 years ago.
Patch to add navigation for repo browser
7254-previous-next-rev-r8709.patch (1.2 KB ) - added by Remy Blank 14 years ago.
Improved version of the first patch.
7254-previous-next-rev-r8709.2.patch (2.3 KB ) - added by Remy Blank 14 years ago.
Improved version using prevnext_nav().

Download all attachments as: .zip

Change History (15)

by res@…, 16 years ago

Attachment: trac-rev-navigate.diff added

Patch to add navigation for repo browser

comment:1 by Christian Boos, 16 years ago

Milestone: 0.12

Looks good.

comment:2 by Christian Boos, 15 years ago

Milestone: 0.130.12

comment:3 by Thijs Triemstra <info@…>, 15 years ago

Cc: info@… added

comment:4 by Ryan Ollos <ryano@…>, 15 years ago

Cc: ryano@… added

comment:5 by Remy Blank, 15 years ago

Owner: changed from Christian Boos to Remy Blank

I'll test and apply.

by Remy Blank, 14 years ago

Improved version of the first patch.

comment:6 by Remy Blank, 14 years ago

The patch above is an improved version of the first patch:

  • Use node.rev to determine previous and next revision, instead of rev_or_latest.
  • Don't display a "Next Revision" link when already at the latest revision.
  • Added arrows.

However, it has the following caveats (that were already present in the original patch):

  • Using repos.prev_rev() and repo.next_rev() doesn't work well for directories, so the links are only shown for files. Making it work for directories would require using the same logic as in the revision log, and even then, would only allow going back in time, not forward (the same as in the log). I feel this is too much complication for the added value.
  • repos.prev_rev() doesn't follow copies. I could probably add some logic for that, but I'm not sure it's worth the effort.

Thoughts?

comment:7 by Christian Boos, 14 years ago

I think we can live with the proposed implementation and the caveats above (the TracBrowser interface can always be improved later, especially when the rev navigation logic itself gets improved).

But can we have a way to see:

<- Previous Revision | Revision Log | Next Revision ->

so that it matches what we have when looking at specific versions of wiki pages or tickets?

in reply to:  7 comment:8 by Remy Blank, 14 years ago

Replying to cboos:

But can we have a way to see:

Sure, actually that's what the original patch was doing. I couldn't find a place where we had the same situation (previous and next links, and other links in-between), so I settled for keeping the links that are always present always at the same location (on the right). But better be consistent.

comment:9 by Remy Blank, 14 years ago

Mmh, the wiki pages actually have the following:

<- Previous Version | View Latest Version | Next Version -> | Last Change

How about using prevnext_nav(), like we do for wiki pages? Patch coming up shortly.

by Remy Blank, 14 years ago

Improved version using prevnext_nav().

comment:10 by Remy Blank, 14 years ago

Resolution: fixed
Status: newclosed

Last patch applied in [8745], the navigation is consistent with wiki pages.

comment:11 by Ryan Ollos <ryano@…>, 14 years ago

Hello,

I was looking at the changes you made, and because you merged this into the trunk I was expecting that if I navigated to a file such as browser:trunk/trac/versioncontrol/web_ui/browser.py, I would be able to see the prev/latest/next revision links.

I was assuming that this Trac site was running off the trunk. Is that not the case?

  • Ryan

comment:12 by Remy Blank, 14 years ago

No, it's running 0.11-stable (r8631 at the moment).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank 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.