Opened 14 years ago
Closed 14 years ago
#9694 closed defect (fixed)
Annotate revision links are not for revision being browsed but latest for file
Reported by: | osimons | Owned by: | osimons |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.2 |
Component: | version control/browser | Version: | 0.11-stable |
Severity: | normal | Keywords: | stickyrev |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When annotating various files in browser, the user is progressively moved back in the history for browsing the whole repository. The 'Annotate' and 'Normal' links use the last revision of the file instead of the revision of the repository being browsed.
Further details at bitten:ticket:466#comment:7
Suggested fix:
-
trac/versioncontrol/web_ui/browser.py
a b 456 456 title=_('View file without annotations'), 457 457 href=req.href.browser(reponame, 458 458 node.created_path, 459 rev= node.rev))459 rev=rev)) 460 460 else: 461 461 add_ctxtnav(req, _('Annotate'), 462 462 title=_('Annotate each line with the last ' … … 464 464 '(this can be time consuming...)'), 465 465 href=req.href.browser(reponame, 466 466 node.created_path, 467 rev= node.rev,467 rev=rev, 468 468 annotate='blame')) 469 469 add_ctxtnav(req, _('Revision Log'), 470 470 href=req.href.log(reponame, path, rev=rev))
Attachments (0)
Change History (12)
comment:1 by , 14 years ago
Summary: | Annotate revision links are off → Annotate revision links are not for revision being browsed but latest for file |
---|
comment:3 by , 14 years ago
This is for being able to toggle annotate on/off when viewing a file at a given revision.
We have a Last Revision link for going directly to the last revision (in 0.12). I'd rather keep things as they are.
comment:4 by , 14 years ago
More precisely, I'd rather keep the Normal and Annotate links as they are, but perhaps fix this in the path links. But there we would have another small problem, which is to show a different revision after the @ from the one for which we see the log message. Maybe that's not a big deal though.
follow-up: 6 comment:5 by , 14 years ago
I don't understand that. The issue here is that if you view a file at a given revision, then click on "Annotate", you view the annotated file at a different revision. And then, you click on the "Normal" link, and you view the file again at the different revision. So basically, after a toggle cycle, you are not back where you were.
I find this quite unintuitive and annoying.
follow-up: 8 comment:6 by , 14 years ago
Replying to rblank:
So basically, after a toggle cycle, you are not back where you were.
Really? Not in my testing: try e.g. source:trunk/AUTHORS or even source:trunk/AUTHORS@199, you have the toggle behavior, which I believe is good to have.
I think osimons complained about something else: the fact that when browsing latest (e.g. source:trunk/AUTHORS) and clicking annotate, you would then have 7460 become "sticky", going back in the history. If you browse from there and go to a different file, repeat annotate, you'd go to the latest of that other file, going to an even earlier point in the history. Hence my proposal to not have the Annotate and Normal link affect the sticky revision.
comment:7 by , 14 years ago
Ok, maybe it's just the end of the week and I'm getting a bit thick… I think now we're talking about the same thing, and possibly the patch does the right thing ;-) I'll test it.
comment:8 by , 14 years ago
Replying to cboos:
If you browse from there and go to a different file, repeat annotate, you'd go to the latest of that other file, going to an even earlier point in the history.
Right, you can actually 'Annotate' your way completely through to first repository revision without ever making a conscious decision about changing revisions.
comment:9 by , 14 years ago
Christian, when you agree to the patch I think I want it applied to 0.11-stable too. That way I can make it work correctly on our showcase b.e.o site + provide an easy upgrade fix for both 0.11 and 0.12 Bitten users.
BTW, 'Coverage' annotation is now redone and updated on b.e.o site. Try it out - it provides a really nice experience (except when linking back to 'Normal'), and fixes numerous issues with finding annotation data. Got a 'Lint' annotator on my future todo as well, so it is necessary to make the experience consistent with the 'Normal' item provided by Trac.
comment:10 by , 14 years ago
Ok, patch works fine, please commit. If you'd like to commit on 0.11-stable, please do (remember we didn't plan to do any more release there, however).
As a second step, I think we should do the further improvements:
- better identify the commit message shown as the one corresponding to the last change on the file
- dissociate the revision shown in the path (the sticky rev, the one used for browsing) from the last change one. Currently we display e.g. source:trunk/README@3544 even when browsing at the latest rev (fortunately, the link to source:trunk from there goes to latest or whatever rev is the sticky rev)
comment:11 by , 14 years ago
Committed in [10236:10238] for all active branches.
As for displaying the revision, I agree that this isn't really intuitive either. In the heading with path we should show the revision being browsed regardless of latest change revision. The link to latest change for the file is quite easy to spot just below together with the change information. I think that is plenty enough.
Do you want to keep this ticket open as a reminder for the other revision issue, or should I close it now?
comment:12 by , 14 years ago
Keywords: | stickyrev added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Issue closed with [10236:10238], further improvements made on trunk in r10240 and r10241.
Well, 'off' as in 'wrong'… Better summary :-)