Trac links to branch-specific changesets don't work

Bug #497348 reported by Andrew Schulman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trac-Bzr
Invalid
Undecided
Unassigned

Bug Description

Our trac-bzr install points to a plain directory which contains several shared repositories. In each of these shared repositories are a number of related branches. This is the same as in #264734, although I'm not sure this bug is related to that one.

In wiki pages and bug reports, trac links to changesets don't work. To refer to a changeset in trunk, I should be able to write e.g. [200/trunk] or changeset:200/trunk . But when I try either of these, the resulting text isn't a link. It's grey, and when I hover my mouse over it, the tooltip says "No changeset 200 in repository".

I've also tried using just r200 or changeset:200, but those don't work either. That's as expected, since the branch name would need to be specified.

Thanks,
Andrew.

Revision history for this message
Andrew Schulman (andrex) wrote :

Forgot to mention that my trac-bzr is trunk r85.

description: updated
Revision history for this message
Martin von Gagern (gagern) wrote :

The notation to use would be "changeset:trunk,200" as described in the README file. This denotes "everything that belongs to revno 200 in the trunk branch". "changeset:200/trunk" would have been "everything in the trunk subdirectory of revision 200 of a branch located at the root of the repository", and as you don't have such a branch, it won't work and isn't expected to.

Changed in trac-bzr:
status: New → Invalid
Revision history for this message
Andrew Schulman (andrex) wrote :

OK, you're right. changeset:trunk,200 works. However, [trunk,200] doesn't. Should it?

Changed in trac-bzr:
status: Invalid → New
Revision history for this message
Andrew Schulman (andrex) wrote :

I'm sorry, I see that this is in the README.

The README seems to say that the bracket changeset syntax doesn't work because of a problem in Trac, rather than trac-bzr. So I'll close this again.

Thanks,
Andrew.

Changed in trac-bzr:
status: New → Invalid
Revision history for this message
Martin von Gagern (gagern) wrote :

Yes, there is a regular expression hardcoded into trac as to what can be a changeset. In trac 0.11-stable it's this:
CHANGESET_ID = r"(?:\d+|[a-fA-F\d]{8,})" # only "long enough" hexa ids
There is no way for trac-bzr revids to follow such a scheme and still stay readable to humans.

Maybe we could provide our own IWikiSyntaxProvider in the future, but that would need some drafting.

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.