#7254 closed enhancement (fixed)
Add navigation (prev/next revision) to repo browser
Reported by: | 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)
Change History (15)
by , 16 years ago
Attachment: | trac-rev-navigate.diff added |
---|
comment:2 by , 16 years ago
Milestone: | 0.13 → 0.12 |
---|
comment:3 by , 15 years ago
Cc: | added |
---|
comment:4 by , 15 years ago
Cc: | added |
---|
by , 15 years ago
Attachment: | 7254-previous-next-rev-r8709.patch added |
---|
Improved version of the first patch.
comment:6 by , 15 years ago
The patch above is an improved version of the first patch:
- Use
node.rev
to determine previous and next revision, instead ofrev_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()
andrepo.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?
follow-up: 8 comment:7 by , 15 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?
comment:8 by , 15 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 , 15 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 , 15 years ago
Attachment: | 7254-previous-next-rev-r8709.2.patch added |
---|
Improved version using prevnext_nav()
.
comment:10 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Last patch applied in [8745], the navigation is consistent with wiki pages.
comment:11 by , 15 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
Patch to add navigation for repo browser