Ability to rewrite URLs

Bug #53948 reported by Jelmer Vernooij
2
Affects Status Importance Assigned to Milestone
bzr email commit hook
Fix Released
Wishlist
Unassigned

Bug Description

Currently, the plugin reports the local URL the commit was made in. It should be able to rewrite that URL to something other users will be able to pull from.

Revision history for this message
Matthieu Moy (matthieu-moy) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I just checked out your branch. It'd be useful if it could rewrite just part of the URL. I keep a whole set of bzr branches in one directory and mirror that directory on some remote server. I would like to be able to specify a rewrite rule that replaces part of a local URL with a remote URL, for example:

file:///home/jelmer/bzr.samba/ -> http://people.samba.org/bzr/jelmer/samba

Otherwise I will have to set a rewrite URL for each branch I create.

Changed in bzr-email:
importance: Untriaged → Wishlist
Revision history for this message
John A Meinel (jameinel) wrote :

In the bzr-pqm plugin (formerly known as pqm-submit), we use repository configuration to do this.
So you can set:
[/home/foobar/repo]
public_repository=http://foobar/repo

And then when you run 'bzr pqm-submit' it will check and see what the repository is for the current branch, and tack on whatever relative path it needs to, to turn that into a public location.

I think it would be good to leverage what we've done with bzr-pqm
https://launchpad.net/products/bzr-pqm

It isn't perfect yet, but since we both have the same need (translate a local path into a public path). I think it could be good to share.

Jelmer Vernooij (jelmer)
Changed in bzr-email:
status: New → Triaged
Revision history for this message
John A Meinel (jameinel) wrote :

You can use "public_branch=XXX" to get this effect. The code does:

    def url(self):
        """What URL to display in the subject of the mail"""
        url = self.config.get_user_option('post_commit_url')
        if url is None:
            url = self.config.get_user_option('public_branch')
        if url is None:
            url = self.branch.base
        return url

Changed in bzr-email:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.