Merge lp:~tzeentch-gm/trac-bzr/doc_updates into lp:trac-bzr

Proposed by Michael Gliwinski
Status: Merged
Merge reported by: Martin von Gagern
Merged at revision: not available
Proposed branch: lp:~tzeentch-gm/trac-bzr/doc_updates
Merge into: lp:trac-bzr
Diff against target: 92 lines (+57/-0)
2 files modified
HACKING (+18/-0)
README (+39/-0)
To merge this branch: bzr merge lp:~tzeentch-gm/trac-bzr/doc_updates
Reviewer Review Type Date Requested Status
Martin von Gagern Approve
Review via email: mp+18098@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Gliwinski (tzeentch-gm) wrote :

Few documentation updates regarding format of revision specifications, based on our recent conversation with Martin. Let me know if I should tweak anything further.

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

Nice. Thanks for saving me the work! A few comments, though:

1. The "two options" feel radically different to me: one affects the strings as I write them in Wiki text, and has to worry about keeping things unambiguous. The other affects the strings as Trac displays them to me, and although ambiguity there would degrade usability, it wouldn't break things completely. So I'd make this two distinct items, even if they are both related to possible future development.

2. Add a link to http://trac.edgewall.org/wiki/MultipleRepositorySupport alongside the one to https://blueprints.launchpad.net/trac-bzr/+spec/multirepo, as people might want to check the Trac development as well.

3. s/to do that/implementing it/ to avoid repetition and be more clear.

4. While you are at it, maybe you want to mention unsupported download links from bug #394204 as yet another known limitation. If you don't want to, I'll add that myself when I merge your changes.

review: Needs Fixing
Revision history for this message
Michael Gliwinski (tzeentch-gm) wrote :

> Nice. Thanks for saving me the work! A few comments, though:

No probs, thanks for the feedback.

> 1. The "two options" feel radically different to me: one affects the strings
> as I write them in Wiki text, and has to worry about keeping things
> unambiguous. The other affects the strings as Trac displays them to me, and
> although ambiguity there would degrade usability, it wouldn't break things
> completely. So I'd make this two distinct items, even if they are both related
> to possible future development.

Yes, I know what you mean, they both affect one user-visible feature but under the hood, they're in distinct places and unrelated.

> 2. Add a link to http://trac.edgewall.org/wiki/MultipleRepositorySupport
> alongside the one to https://blueprints.launchpad.net/trac-
> bzr/+spec/multirepo, as people might want to check the Trac development as
> well.
>
> 3. s/to do that/implementing it/ to avoid repetition and be more clear.
>
> 4. While you are at it, maybe you want to mention unsupported download links
> from bug #394204 as yet another known limitation. If you don't want to, I'll
> add that myself when I merge your changes.

I'll have a look to address those.

lp:~tzeentch-gm/trac-bzr/doc_updates updated
106. By Michael Gliwinski

Reorganized notes on addressing revspec limitations according to feedback.

107. By Michael Gliwinski

Added reference to MultipleRepositorySupport info page in Trac wiki.

108. By Michael Gliwinski

Fixed wording to make it clearer.

109. By Michael Gliwinski

Added info on unsupported download links.

Revision history for this message
Michael Gliwinski (tzeentch-gm) wrote :

I updated the branch, I see it's been picked up by LP but should I also set the review to resubmit or sth? (Sorry, don't see anything relevant in LP docs).

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

Looks fine now, thanks. Will commit this tomorrow. I'll first have to figure out the best way to integrate this into both trunk and the 0.3 branch.

review: Approve
Revision history for this message
Michael Gliwinski (tzeentch-gm) wrote :

Cool, thanks.
Maybe I should have done the changes against 0.3, then you'd be able to just merge it into trunk, no?

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

Yes, but never mind. Remember it if you should do future development, though.

You might however wish to change the Status of the branch from Development to Merged, as launchpad probably didn't catch that due to the fact that your head revision isn't integrated into trunk, as rebasing assigned new revision ids.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'HACKING'
2--- HACKING 2009-12-17 18:38:17 +0000
3+++ HACKING 2010-01-27 20:43:09 +0000
4@@ -14,6 +14,11 @@
5 a revision id by itself wouldn't give us an absolute path in that
6 tree if there were multiple branches containing that revision.
7
8+- Since Trac assumes revision numbers are global (as they are for svn)
9+ and it doesn't give enough context for queries (e.g. path), there's no
10+ way around this for now. This may change in the future when multi-repo
11+ support is available (Trac 0.12).
12+
13 - If there is only a single branch at the root of the directory
14 configured as the bzr repository in Trac, then no branch name will
15 be included in revision strings. In this case, simple revision
16@@ -21,6 +26,19 @@
17 trac-bzr will allow users to configure a "default branch" to obtain
18 simple revision names even when dealing with multiple branches.
19
20+- In order to be able to use simple revision numbers in TracLinks, one could
21+ write a wiki syntax parser which translates e.g. specifications like
22+ ``[tracsource:/foo/bar/baz@10]`` into link to the source browser with full
23+ revision specification (i.e. ``.../browser/foo/bar/baz?rev=foo,10``) while
24+ making sure things are unambiguous.
25+
26+- The way revision numbers are displayed in the source browser is controlled
27+ by Trac's internal Genshi template. In Trac >= 0.11 it would be possible
28+ to affect that by writing a component which would act as postprocessing
29+ hook with it's own Genshi template which reformats such links (i.e. the
30+ hrefs would still need to use the same format but the visible text can be
31+ rendered as simple numbers, e.g. check the ``Branches`` macro).
32+
33 - When generating revision strings, we prefer (dotted) revision
34 numbers over bzr revision identifiers. Only when the revision in
35 question hasn't been merged into that branch yet we emit a revision
36
37=== modified file 'README'
38--- README 2009-12-17 21:48:27 +0000
39+++ README 2010-01-27 20:43:09 +0000
40@@ -153,6 +153,10 @@
41 This is a comma-separated ordered list of the main branches of your project.
42 You may also specify `glob patterns`_ in this list to match multiple branches.
43
44+Note that the pattern must match from the root of repository_dir, so if you
45+set it to e.g. a directory containing sub-directories which in turn contain
46+branches, you should set primary_branches to ``*/BRANCH``.
47+
48 The Branches_ wiki macro will list branches in the order specified by this list.
49 The timeline view will try to associate changesets with branches in the
50 specified order.
51@@ -200,6 +204,41 @@
52 However, you can use the changeset notation instead, e.g.
53 ``changeset:tree,25``.
54
55+Revision specification format
56+-----------------------------
57+Since Trac repository queries don't give trac-bzr enough context, revisions
58+have to be specified and are presented in the format ``PATH_TO_BRANCH,REV``
59+where ``PATH_TO_BRANCH`` is the path to branch (or object within the branch
60+like directory or file) relative to repository_dir, with slashes ('/')
61+replaced with colons (',').
62+
63+This is visible when browsing the branches via Trac's source browser and this
64+is also what you have to use in TracLinks.
65+
66+This may be improved in the future when Trac properly supports multiple
67+repositories (possibly Trac 0.12, see Trac's `MultipleRepositorySupport`_
68+page). Also see `trac-bzr multirepo spec`_.
69+
70+In the meantime, if you have an urgent need to address that and are able
71+to spend some time implementing it, have a look at HACKING document for
72+possible approaches in Trac 0.11 and below.
73+
74+.. _`MultipleRepositorySupport`: http://trac.edgewall.org/wiki/MultipleRepositorySupport
75+.. _`trac-bzr multirepo spec`: https://blueprints.launchpad.net/trac-bzr/+spec/multirepo
76+
77+Unsupported download links
78+--------------------------
79+Using download links in source browser (under "Download in other formats"
80+heading) is not supported. For details see `bug 394204`_, in short this is
81+a problem should be addressed in Trac itself.
82+
83+In fact an `upstream bug report`_ is already filled in and a patch is
84+available, so if you're interested in this feature check it out and discuss
85+any issues with it upstream.
86+
87+.. _`bug 394204`: https://bugs.launchpad.net/trac-bzr/+bug/394204
88+.. _`upstream bug report`: http://trac.edgewall.org/ticket/8919
89+
90 File encoding
91 -------------
92 Because at the moment Bazaar does not store information about encoding of text