Bazaar Webserve modifications
Goffredo Baroncelli
kreijack at inwind.it
Mon Aug 28 21:39:32 BST 2006
On Friday 25 August 2006 23:45, Martijn van der Kwast wrote:
> Hello Goffredo,
Hello Martin
> I really like you plugin Webserve plugin for bzr, and I am using it
> experimentally on my website. I made a few modifications to it to add
> some features I wanted to have. You can find them here:
> http://www.stilglog.com/bazaar/bazaar-webserve .
>
> I am in no way an expert in python, and I'm not requesting you integrate
> them in the mainline, but maybe there is something in there that can be
> useful to you.
>
> The list is:
Thank for your ideas, I rearranged the order of your list. See my comments
>
> - made pages XHTML 1.0 Transitional: not really a necessity, but I like
> my tags to be closed.
I am not a HTML expert, so I don't know what happen if you use an old Netscape
3.0/2.0 ( not so strange with a old sun ).
> - Allow url of repository to be specified: The [Repository] links
> pointed to the logs, and I was unable to use that url to get the files
> with 'bzr branch' . I added a 'repo' option to specify the url of the
> repository. If it's not set, the old rules are used to generate a
> repository url.
Yes this is a very good idea: pulled (
http://goffredo-baroncelli.homelinux.net/bazaar/bazaar-webserve?cmd=revision;revid=ghigo%40venice-20060828201956-25d1dd11d4868aaa )
>
>
> There are two other things I would like to implement, but I haven't
> decided how to do it yet:
>
> - I would like the projects and projects groups to appear in the same
> order as in the configuration file. Unfortunately, that's impossible
> with the current options and the python ConfigParser. There are 2
> choices: either I add an 'order' option to the sections (rather ugly,
> but easy to implement) or I use another parser (probably not worth the
> effort).
>
> - Organize projects in groups: Instead of displaying all the projects in
> one flat list, the can be grouped. A file named
> bazaar-webserve-groups.config.examples was added to configure the
> groups, and a 'group' option was added to the configuration sections for
> the branches to select the group a branch belongs to.
I dont' like the idea of two config files; I think that we can change the
synatax of the config file:
we should have a section called [main] which lists the groups. For every
groups there is a section which sets the parameters (title, url, short
description, long description....) and sets also the repository list.
For every repository listed, there is a section which sets the parameters
(title, url, short description, long description....) and optionally sets
addition button at the top of the [main] page [see below]
The order is the one of the comma separated item.
For example:
; main config
[main]
; a comma separated list of the groups
GroupsList = group1,group2,group3
; ------------ groups ----------------------
[group1]
; title = group name as displayed in page (optional, group-name is used by
default)
; groupurl = link to external page (optional)
; shortdesc = description
repositories=repo1,repo2
[group2]
repositories=repo3
....
; ------------ repositories ----------------
[repo1]
group=group1
repository=url/to/repository
....
[repo2]
....
[repo3]
....
> - added link to go back to projects list: This adds a 'projects' link to
> the buttons at the top of the page in the branch views to make it
> possible to navigate back to the first page.
>
> - Add links to external project page and bug tracking page: this adds a
> 'groupurl' and a 'bugsurl' option to the configuration sections to
> generate a link to a project's webpage and the bug tracking page. The
> links are displayed as [Web] and [Bugs] next to the other links on the
> frontpage ([Log], [Inventory], etc)
For every repository we can have an option as:
[repo1]
group=group1
repo=url/to/repository
title=bla bla bla
buttons=btnOne,btnTwo ; comma separated list of button
....
; buttons
[btnOne]
title=Button one
url=Button one url
[...]
[btnTwo]
title=Button two
...
>
> - I would like to automatically convert sequences like 'issue: 23' or
> 'bug: 23' to links to their bug-tracker page. It would be a quick hack
> to make that work for my site, but maybe it's a feature that would
> interest other users, and it could be interesting to make it more generic.
I think that with a filter that support the sed/perl syntax, we can do what
you want
As example:
commentFilter=replace:what="bug:
([0-9]*)","http://bugzilla.web.net/bugid=\1";replace:what="issue:
([0-9]*)","http://bugzilla.web.net/issueid=\1"
So, we can do replace like
bug123 -> http://bugzilla.web.net/bugid=123
issue123 -> http://bugzilla.web.net/issueid=123
We can express these filter, globally, or per basis group or per repository.
in the future we can have filter like
commentFilter=plugin:/path/to/plugin.py
>
> Sincerely,
> Martijn van der Kwast
Goffredo
--
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack at inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87 87C0 BB86 505C 6B2A CFF9
More information about the bazaar
mailing list