Ticket #4612 (new enhancement)
Changeset URL to contain the revision in the query string.
| Reported by: | Peter Dimov <peter.dimov@…> | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.13 |
| Component: | version control | Version: | 0.10.3 |
| Severity: | normal | Keywords: | revision |
| Cc: |
Description
I’m using bzr as version control backend provided by the trac+bzr plugin. Since each branch has its own revision numbers, the revisions as seen by trac have the format:
path/to/branch,revno
ChangesetModule.match_request will match 'path' to the revision and 'to/branch,revno' as the path. trac+bzr works around this problem by URL escaping the revision string but the result is highly unreadable and not at all user-friendly.
Attached is a very simple patch I’m using to make trac gracefully handle the above scenario. I have added a configuration switch for the new format because I expect some people would like to keep the old URLs valid.
The solution is simply to change the changeset URLs from:
/changeset/revision/path
to:
/changeset/path?new=revision
The latter is also totally consistent with URLs of log and browser:
/log/path?rev=old_rev&stop_rev=new_rev /browser/path?rev=revision
The patch also allows a new changeset notation:
changeset:path@revision
Clearly the changeset:revision/path notation cannot be used when revision can contain a slash.


