Skip to content

Ability to group repositories by means of reg exp #323

Closed

Description

@gitblit

Originally reported on Google Code with ID 27

This is not a defect but a suggestion.

I know it is currently possible to group repositories by means of subfolders, but that
approach is not always optimal because it does not match very well with gitolite (which
AFAIK requires all repositories to be included in a single folder). One could overcome
this problem by making use of file system links, by recreating a tree directory structure
containing links to repos physically locate elsewhere, and having gitblit point to
the new tree directory structure instead of using the actual (flat) repository folder.
However this is inconvenient when a new repository is created, because the admin must
remember to create the new link as well.

This is why I believe it would be useful to be able to group repositories by name.

For example, a configuration property such as:

groupRegExp=aaaa\..* bbbb\.*

may be used to tell gitblit to group repositories in two groups, one consisting of
all repositories starting with "aaaa.", the other consisting of the repositories starting
with "bbbb." and gitblit may implicitly create an additional group "others" to group
repositories whose name does not match any of the declared groups.

When such an options is enabled, the web fronted should offer a main page where the
user sees only the list of groups as links, and then the user can click on a group
name to go to the index page which shows the list of all repositories included in such
group. Gitblit should also compute the repository size only on the second page and
this would speed up the time needed to access a repository.

An alternative approach could consist in being able to filter out repositories by means
of a url request. For example, the following URL http://gitblit/summary/?r= displays
the list of all repositories, and the following url http://gitblit/summary/?r=reponame
takes the user to the homepage of the specified repository. It would be useful to be
able to invoke an url such as http://gitblit/summary/?r=aaaa. to be taken to a page
that lists all repositories starting with "aaaa.".


Reported by gm.romanato on 2011-10-21 10:52:35

Activity

  1. gitblit commented on Aug 12, 2015

    @gitblit
    CollaboratorAuthor
    I was thinking of supporting repository tags and defining some sort of "group by tag"
    and "view tag" pages.  This is not exactly what you are asking for but I don't know
    if I would support RegExp grouping.  I hadn't considered that.
    
    If you really want to group by name, why don't you switch web.repositoryListType from
    "grouped" to "flat".
    
    You can also double-check repository size calculation time by temporarily disabling
    web.showRepositorySizes to see how the calculation impacts page load performance. 
    Maybe I'll add some logging info to indicate the time required for calculation so that
    users can make an educated decision on if it hurts performance or not.
    

    Reported by James.Moger on 2011-10-21 11:55:20

  2. self-assigned this
    on Aug 12, 2015
  3. gitblit commented on Aug 12, 2015

    @gitblit
    CollaboratorAuthor
    The next release will have a per-repository setting to skip size calculation, will indicate
    the time spent calculating size, and will cache/reuse the last size if the repository
    is not modified in the interim.
    

    Reported by James.Moger on 2011-10-22 13:03:59

  4. gitblit commented on Aug 12, 2015

    @gitblit
    CollaboratorAuthor
    I'm going to implement a url parameter to _filter_ (but not group) the repositories
    list.  It will not be a real regex as that introduces all sorts of encoding issues.
    
    The repository list will support simple fuzzy matching, listing by federation set,
    and perhaps one or two other filters, TBD.
    

    Reported by James.Moger on 2011-12-08 22:05:49

    • Status changed: Accepted
    • Labels added: Milestone-0.8.0
  5. gitblit commented on Aug 12, 2015

    @gitblit
    CollaboratorAuthor
    v0.8.0 released.
    
    I did not implement navigation as you had suggested.  For the time-being I consider
    this to be a closed issue.  Try the new release and tell me what you think.
    

    Reported by James.Moger on 2012-01-11 21:46:20

    • Status changed: Fixed
  6. gitblit commented on Aug 12, 2015

    @gitblit
    CollaboratorAuthor
    Looks good to me. The fact that once set a filter is "sticky" and applies not only to
    "repositories" but also to "activity" perfectly matches my needs.
    
    Plus, it can be used in bookmarks!
    
    Thanks.
    
    
    

    Reported by gm.romanato on 2012-01-13 14:04:25

  7. modified the milestone: 0.8.0 on Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions