Opened 11 years ago
Last modified 15 months ago
#11439 new enhancement
Git changeset "Branches" property should link to branch logs
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | version control/changeset view | Version: | 1.0 |
Severity: | normal | Keywords: | |
Cc: | Jun Omae | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When viewing a Git changeset like [d19b3083d40b9237e8dbffa91dfa9f2f3b65e2ad/rjollos.git], the "Branches" property (showing the list of branches which contain this changeset) generates a link for each branch. Currently, the generated link is a "changeset" view of the branch's tip, so (e.g.) clicking on "trunk" in that list will show you the most recent changeset on the "trunk" branch.
This seems confusing. When I click on a branch in that list, seeing a changeset view makes me feel like I've lost my place in navigating around the repository. (This is exacerbated by the fact that the URL in the address bar and the <h1>
on the page both reference the SHA of the branch tip, and there's no visual indicator that I'm viewing a particular branch tip.)
When I click on a branch in that list, I expect to go somewhere that contextualizes the branch somehow. I think the "log" view for that branch is the most sensible place to land.
Attachments (0)
Change History (10)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
This would be problematic in some cases:
- User has CHANGESET_VIEW permission but does not have LOG_VIEW permission
- Environment has
trac.versioncontrol.web_ui.changeset.ChangesetModule
component enabled but hastrac.versioncontrol.web_ui.log.LogModule
component disabled
Perhaps in those cases the link should revert to its current behavior. Or maybe these are reasons to wontfix and/or implement in a plugin.
comment:3 by , 11 years ago
Replying to ethan.jucovy@…:
When I click on a branch in that list, I expect to go somewhere that contextualizes the branch somehow. I think the "log" view for that branch is the most sensible place to land.
I'll have to think about it some more, but navigating to the log view seems more intuitive to me as well.
comment:4 by , 11 years ago
Cc: | added |
---|---|
Milestone: | → next-stable-1.0.x |
Version: | → 1.0 |
I think we should add browser view and log view links for revision to the changeset view, not only git property renderer. It would be useful. Thoughts?
comment:5 by , 11 years ago
It sounds like a useful aid for navigation. Where would the browser view and log view links be placed?
comment:6 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:7 by , 6 years ago
Very useful change (I came to see if a ticket existed to record a "default branch" to show in browser, but found this to be also useful to have)
comment:8 by , 6 years ago
we should add browser view and log view links for revision to the changeset view
Where would the browser view and log view links be placed?
I would expect something like this:
diff -r ec566f6d999f trac/versioncontrol/web_ui/changeset.py @@ -367,6 +373,11 @@ prevnext_nav(req, _('Previous Change'), _('Next Change')) else: prevnext_nav(req, _('Previous Changeset'), _('Next Changeset')) + add_ctxtnav(req, _('Revision Log'), + href=req.href.log(reponame, new_path, rev=new)) + add_ctxtnav(req, _('View Revision'), + href=req.href.browser(reponame, new_path, rev=new)) + else: rev_href = req.href.changeset(old, full_old_path, old=new, old_path=full_new_path)
There are already similar links from the browser to the log and from the log to the browser.
comment:9 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
The following patch changes the "Branches" links to go to the log view of the branch's tip:
tracopt/versioncontrol/git/git_fs.py
It might be preferable (for reasons described in #11437) to instead generate a "non-normalized" link to the branch name itself, rather than to the SHA of its current tip; the following patch would do that:
tracopt/versioncontrol/git/git_fs.py