trac-bzr 0.3.0

Michael Gliwinski Michael.Gliwinski at henderson-group.com
Fri Jan 22 13:03:59 GMT 2010


On Friday 22 January 2010 11:08:55 Martin von Gagern wrote:
> Hi Michael!
>
> On 22.01.2010 12:26, Michael Gliwinski wrote:
> > I do have a couple of questions if you don't mind.
>
> Sure. If you don't mind, I might turn some of them into FAQ items at
> https://answers.launchpad.net/trac-bzr if the need for it arises.

Of course.  If you want can re-format our conversation and put it in the 
README and submit an mp later on.

> > 1. revisions are showing up in form PROJECT,BRANCH,REVNO; from the
> > HACKING document I gather this is expected, yes?  the question is, when
> > using TracLinks to refer to say, a specific revision of a specific file,
> > do you also have to use this form?
>
> Yes, this is expected if your branch is in directory PROJECT/BRANCH
> under the configured repository root. Slashes are simply converted to
> commas.
>
> You also have to use that form for trac links, and have to note that the
> bracket notation for changelogs won't work at all, as noted in the
> README or at http://pypi.python.org/pypi/TracBzr#bracket-syntax

OK

> > 2. do you think there would be some way to avoid that when there is
> > enough context?  e.g. if I have a link like
> > [source:/project/branch/path/to/file at 10] then could the branch not be
> > determined from the path?
>
> I don't think so. The problem is that Trac poses questions to the
> repository without providing too much context info. So in the above
> case, it might want to include a "Next version" link, and therefore ask
> the repo "please tell me the version number after version 10". It
> doesn't give a path for this, as it assumes version numbers to be global
> for the whole repository (as they are for svn), and bzr can't answer
> that kind of question without knowing the branch. Maybe revision 10 is
> the last one?
>
> I guess we could try to perform SOME operations with limited knowledge
> about the version, but I'd rather have the tool fail outright than
> trying to have half-supported features.

Ah, yes, that explains it then.

> A better approach might be the planned multi-repo support in Trac 0.12.
> Together with a planned refactoring of trac-bzr (which I outlined in
> https://blueprints.launchpad.net/trac-bzr/+spec/multirepo ) this should
> give Trac a collection of simple single-branch repositories. I haven't
> looked at the multirepo work in Trac yet, so I don't know what syntax
> they will use, but I trust they'll come up with something appropriate.

Makes sense.  I heard something about multirepo but wasn't aware it's going to 
make it into 0.12.

> Yet another alternative would be writing your own wiki syntax parser.
> Then you could write [tracsource:/foo/bar/baz at 10] and that component
> could translate that into a link to the browser with full revision
> identification. I don't plan to write such a thing, as I hope Trac 0.12
> makes it unneccessary, but if there were urgent need, that's the path
> I'd suggest to people. And I'd be willing to accept contributions here.

Well, I'd say it's not that big a deal ;)  And as you say, quite likely 0.12 
will make it obsolete.

> > 3. revisions in the source browser show up as PROJECT,BRANCH,REVNO; while
> > when using the Branches macro they show up simply as [REVNO]; any way to
> > make the source browser behave the same way?
>
> I've thought about this as well. The complete revision has to be in the
> link href, but not necessarily in the text. For the macro, trac-bzr
> generates the html fragment, and can make this distinction. The browser
> listings are generated by a Trac template, which takes the same
> attribute for link and text. So nothing trac-bzr does by itself (short
> of REALLY EVIL call stack introspection) can make a distinction there.
>
> At least for Trac 0.11 there is the possibility to have a component
> register a postprocessing hook. Then one could write a Genshi template
> to reformat such links. I guess I'd do this one day, but don't know
> when. If you want to, feel free to open a whishlist bug report.

I'll see how it goes with my users (i.e. if they complain about it).  However 
it just occured to me that since for now you have to specify revisions this 
way in e.g. links, it might actually be better that they're displayed that 
way, makes it easier to find out what to use in your link.

> > 4. failed to get the primary_branches setting working; I have it set
> > to 'trunk,[0-9]*,' but still PROJECT/some_feature shows up before
> > PROJECT/trunk; any tips on debugging it?  (I have trac's debug log
> > enabled but nothing relevant in there)
>
> Include the PROJECT part. Set it to "*/trunk,*/[0-9]*".

/me bangs my head on the desk

Of course, not enough coffee today I guess.

> > I haven't had a look at the code yet, am a bit pressed for time ATM, but
> > I'll try to have a look soon.
>
> Sure, thanks. I'll in turn have a look at any useful contributions you
> might have to offer.
>
> Greetings,
>  Martin

Thanks for your help Martin.


-- 
Michael Gliwinski
Henderson Group Information Services
9-11 Hightown Avenue, Newtownabby, BT36 4RT
Phone: 028 9034 3319

**********************************************************************************************
The information in this email is confidential and may be legally privileged.  It is intended solely for the addressee and access to the email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed  in the governing client engagement leter or contract.
If you have received this email in error please notify support at henderson-group.com

John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************




More information about the bazaar mailing list