#4223 closed enhancement (fixed)
Merge the browser-quickjump branch
Reported by: | Christian Boos | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | version control/browser | Version: | devel |
Severity: | normal | Keywords: | quickjump |
Cc: | ryano@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
I think the VcRefactoring/BrowserQuickjump branch is now ready for integration.
This branch adds the possibility to have a list of preselected paths where you can easily jump to, in the TracBrowser.
For example, with the Subversion backend, you can specify the following configuration options:
[svn] branches = /trunk,/branches/maintenance/*,/branch/test,branches/experimental/* tags = /tags/maintenance/*,/tags/milestone/*
By default, the preselected paths are the traditionally expected ones: branches = /trunk,/branches/*
and tags = /tags/*
.
But this will be even more handy for people having lots of branches which are sometimes deeply buried in the hierarchy ;)
For TracMercurial, this will give the ability to jump to known tags and branches.
Diff of the changes: diff:trunk@4320//sandbox/browser-quickjump@4326
Attachments (1)
Change History (11)
comment:1 by , 18 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 15 years ago
I used this ticket and the results of my own testing to make some edits to the TracBrowser documentation and the description for the [svn] section of TracIni.
- (1) TracBrowser
- (2) TracIni
comment:3 by , 15 years ago
I have a couple of comments about the syntax used here. (Btw, is it proper form to comment on a closed ticket? It doesn't seem worthwhile to open a ticket for these questions / comments; Also, it does not seem right to reopen the ticket).
My [svn] section of trac.ini looks like this:
[svn] branches = /Common/trunk, /Common/branches, /Utilities/trunk, /Utilities/branches, /Test and Measurement/trunk, /Test and Measurement/branches, /Presto/Product/Software/trunk, /Presto/Product/Software/branches, /Presto/Product/Docs/Released/trunk, /Presto/Product/Docs/Released/branches, /Presto/R&D/Software/trunk, /Presto/R&D/Software/branches, /Presto/Prototype/Verasonics Matlab Simulator/trunk, /Presto/Prototype/Verasonics Matlab Simulator/branches, /Presto/Prototype/PSI Development/trunk, /Presto/Prototype/PSI Development/branches tags = /Common/tags, /Utilities/tags, /Test and Measurement/tags, /Presto/Product/Software/tags, /Presto/Product/Docs/Released/tags, /Presto/R&D/Software/tags, /Presto/Prototype/Verasonics Matlab Simulator/tags, /Presto/Prototype/PSI Development/tags
As you can see, it is difficult to read, spot typos, and make changes. Imagine however, that the syntax was like svn:externals in TracIni.
01 = /Common/trunk 02 = /Common/branches 03 = /Common/tags 04 = /Utilities/trunk 05 = /Utilities/branches 06 = /Utilities/tags 07 = /Test and Measurement/trunk 08 = /Test and Measurement/branches 09 = /Test and Measurement/tags 10 = /Presto/Product/Software/trunk 11 = /Presto/Product/Software/branches 12 = /Presto/Product/Software/tags 13 = /Presto/Product/Docs/Released/trunk 14 = /Presto/Product/Docs/Released/branches 15 = /Presto/Product/Docs/Released/tags 16 = /Presto/R&D/Software/trunk 17 = /Presto/R&D/Software/branches 18 = /Presto/R&D/Software/tags 19 = /Presto/Prototype/Verasonics Matlab Simulator/trunk 20 = /Presto/Prototype/Verasonics Matlab Simulator/branches 21 = /Presto/Prototype/Verasonics Matlab Simulator/tags 22 = /Presto/Prototype/PSI Development/trunk 23 = /Presto/Prototype/PSI Development/branches 24 = /Presto/Prototype/PSI Development/tags
Actually, for my case I could make things a lot simpler by using the wildcard match.
01 = /Common/* 02 = /Utilities/* 03 = /Test and Measurement/* 04 = /Presto/Product/Software/* 05 = /Presto/Product/Docs/Released/* 06 = /Presto/R&D/Software/* 07 = /Presto/Prototype/Verasonics Matlab Simulator/* 08 = /Presto/Prototype/PSI Development/*
It looks like I could also make my current [svn] section simpler by using wildcard matches and grouping all of my paths into either branches
or tags
, and this would be fine for me, but it's not very clean and might be difficult for someone else to interpret were they to encounter my configuration (thinking now in more general usability terms for the Trac project).
My questions are:
- Why group the [svn] options into
branches
ortags
? Wouldn't the quickjump facility be more general if it just took a list of paths? I mean, the user could really configure the quickjump facility to point to any location of interest in the repository, so why not make the general usefulness of the quickjump facility more obvious to the user, and state that the quickjump facility is generally used to point totrunk
,branches
,tags
? - Is the [svn] section used for any other purpose? Would making changes to the [svn] section affect another component or function of Trac?
comment:4 by , 15 years ago
Cc: | added |
---|
comment:5 by , 15 years ago
comment:6 by , 15 years ago
Keywords: | quickjump added |
---|
It's perfectly fine to take a closed ticket for discussing a particular implementation detail. I think it's even preferable than trying to discuss it on the mailing list, as it's more focused and you reach the people directly interested in the feature. If you'd like to gather feedback from a broader base, you could still do both and refer to the ticket in the mailing list.
Ok, now for the specific questions you raised here. First, the quickjump thing is, as most of the rest of the versioncontrol module in Trac, designed to support other systems than just subversion. For example, in TracMercurial, the quickjump menu simply list the existing branches (*) and tags, you have nothing to configure.
For Subversion, the "standard" trunk, branches/* and tags/* is really too restrictive, hence some kind of flexibility. But for setup like yours (the "calc" setup ;-) ), it could be useful to have no tags and branches groups and simply a list of entries, or, alternatively, freely configurable groups.
Those "extra" groups could indeed benefit to any backend, so we could implement it using a new [browser-quickjump]
section (as we could have other quickjump lists in other contexts).
Each entry in this section would be a comma separated list of patterns, much like the current [svn]
tags and branches. Btw, there's no real usability issue with the way it is done currently, as a value for a given entry can be written on multiple lines.
So the "ideal" configuration could be in your case:
[svn] branches = tags = [browser-quickjump] Common = /Common/* Utilities = /Utilities/* Test and Measurement = /Test and Measurement/* Product = /Presto/Product/Software/*, /Presto/Product/Docs/Released/* Prototypes = /Presto/Prototype/Verasonics Matlab Simulator/*, /Presto/Prototype/PSI Development/* R&D = /Presto/R&D/Software/*
The only usability issue left would be the order of the groups themselves, as for now the order of appearance of the entries in the configuration file is ignored. If this is really important, an easy workaround for now would be to use a number prefix for the groups.
comment:7 by , 15 years ago
It does seem like it would make more sense to name the corresponding section [browser-quickjump]. I also like the idea of being able to define groups within the section. The options to have no groups (or equivalently, a single group without a heading) would also be nice. So, assuming you need an index, having a 'special' index that will not be displayed as a heading, would be a nice option.
Thanks for the feedback!
comment:8 by , 15 years ago
Should I open a ticket for this issue? If we decide on a definitive way to proceed, this might actually be something that I could work on, since it seems to involve relatively straightforward changes were I could use the existing code as a guide.
comment:9 by , 15 years ago
Please do so (enhancement ticket for 2.0, which will be moved to an earlier milestone as soon as there's a patch).
Branch merged in trunk in r4438.
I've modified the description to reflect the current convention for the new TracIni entries
[svn] branches
and[svn] tags
.