[PATCH] Add a source_tree field to Project.

Guilherme Salgado guilherme.salgado at linaro.org
Thu Mar 31 01:33:15 EST 2011


On Wed, 2011-03-30 at 14:56 +0800, Jeremy Kerr wrote:
> Hi Janne,
> 
> > I would like to use it for patches.libav.org to link the commit hash to
> > that commit in gitweb. see http://patches.libav.org/patch/1927/ for an
> > example.
> 
> Hm, good idea.
> 
> > It probably needs another field to construct the full URL from source
> > tree and commit_ref.
> 
> I think this could be fairly independent of the source tree: I'd imagine that 
> this could be implemented with a format-string style field on the Project 
> instance:
> 
>  commit_url = 'http://git.ozlabs.org/?p=patchwork;a=commitdiff;h=%s'
> 
> - we then format with (project.commit_url % patch.commit_ref) to create the 
> link.
> 
> I'm happy to add this, but I think it's a separate change to the one that 
> Guilherme is planning. Guilherme - do you agree?

I think so.  We could do some tricks to generate the base commit URL
from the source_tree, but that'd be fragile at best, so I agree it makes
sense to use a separate field for the commit URL.

Cheers,

-- 
Guilherme Salgado <https://launchpad.net/~salgado>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20110330/f83fe6cd/attachment.pgp>


More information about the Patchwork mailing list