Merge lp:~spiv/bzr/alias-loc-docs-337834 into lp:bzr/2.0

Proposed by Andrew Bennetts
Status: Merged
Approved by: Ian Clatworthy
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~spiv/bzr/alias-loc-docs-337834
Merge into: lp:bzr/2.0
Diff against target: 73 lines (+40/-0)
3 files modified
NEWS (+6/-0)
bzrlib/help_topics/__init__.py (+15/-0)
bzrlib/help_topics/en/location-alias.txt (+19/-0)
To merge this branch: bzr merge lp:~spiv/bzr/alias-loc-docs-337834
Reviewer Review Type Date Requested Status
Martin Pool Approve
Review via email: mp+19151@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrew Bennetts (spiv) wrote :

This is a simple fix for a gap in our docs. It's not immensely informative, but it at least provides some docs for a handy feature, and hopefully makes it a little be discoverable by linking to it from the 'urlspec' help topic. Ideally the table in this help topic would be generated programmatically from the AliasDirectory object itself, but incremental improvements are better than nothing.

This is targetted to 2.0, because the info applies just as much there as elsewhere. I also have a branch that merges this to 2.1 (and updates some markup slightly accordingly).

Revision history for this message
Martin Pool (mbp) wrote :

do it

review: Approve
Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Andrew Bennetts wrote:
> Andrew Bennetts has proposed merging lp:~spiv/bzr/alias-loc-docs-337834 into lp:bzr/2.0.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> This is a simple fix for a gap in our docs. It's not immensely informative, but it at least provides some docs for a handy feature, and hopefully makes it a little be discoverable by linking to it from the 'urlspec' help topic. Ideally the table in this help topic would be generated programmatically from the AliasDirectory object itself, but incremental improvements are better than nothing.
>
> This is targetted to 2.0, because the info applies just as much there as elsewhere. I also have a branch that merges this to 2.1 (and updates some markup slightly accordingly).
>

Thank-you!

One minor thing about cross-references: the preferred syntax is now the
Sphinx way, i.e.

See :doc:`xxx-help`.

That will be converted to "See `bzr help xxx`" when shown on a terminal
(and the HTML will correctly cross-link).

Ian C.

PS: I guess I need to advertise that more widely. In HACKING maybe?

Revision history for this message
Andrew Bennetts (spiv) wrote :

Thanks Ian, actually I do that in the 2.1 version of this branch. But that feature isn't in 2.0 :(

I think so long as that feature is documented in an appropriate docstring in bzrlib/help_topics/__init__.py somewhere, it's probably visible enough for now. But perhaps the developer (and/or plugin author) guide should have a short section on writing help topics, if it doesn't already?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-02-05 06:30:42 +0000
3+++ NEWS 2010-02-12 03:59:12 +0000
4@@ -19,6 +19,12 @@
5 ``UnboundLocalError``.
6 (Andrew Bennetts, #423563)
7
8+Documentation
9+*************
10+
11+* Added ``location-alias`` help topic.
12+ (Andrew Bennetts, #337834)
13+
14 bzr 2.0.4
15 #########
16
17
18=== modified file 'bzrlib/help_topics/__init__.py'
19--- bzrlib/help_topics/__init__.py 2009-10-26 23:21:57 +0000
20+++ bzrlib/help_topics/__init__.py 2010-02-12 03:59:12 +0000
21@@ -245,6 +245,19 @@
22 out += "\nSupported modifiers::\n\n " + \
23 ' '.join(decl)
24
25+ out += """\
26+\nBazaar supports all of the standard parts within the URL::
27+
28+ <protocol>://[user[:password]@]host[:port]/[path]
29+
30+allowing URLs such as::
31+
32+ http://bzruser:BadPass@bzr.example.com:8080/bzr/trunk
33+
34+Many commands that accept URLs also accept location aliases too. See
35+`bzr help location-alias`.
36+"""
37+
38 return out
39
40
41@@ -713,6 +726,8 @@
42 'Types of conflicts and what to do about them')
43 topic_registry.register('debug-flags', _load_from_file,
44 'Options to show or record debug information')
45+topic_registry.register('location-alias', _load_from_file,
46+ 'Aliases for remembered locations')
47 topic_registry.register('log-formats', _load_from_file,
48 'Details on the logging formats available')
49 topic_registry.register('diverged-branches', _load_from_file,
50
51=== added file 'bzrlib/help_topics/en/location-alias.txt'
52--- bzrlib/help_topics/en/location-alias.txt 1970-01-01 00:00:00 +0000
53+++ bzrlib/help_topics/en/location-alias.txt 2010-02-12 03:59:12 +0000
54@@ -0,0 +1,19 @@
55+Location aliases
56+================
57+
58+Bazaar defines several aliases for locations associated with a branch. These
59+can be used with most commands that expect a location, such as `bzr push`.
60+
61+The aliases are::
62+
63+ :parent the parent of this branch
64+ :submit the submit branch for this branch
65+ :public the public location of this branch
66+ :bound the branch this branch is bound to, for bound branches
67+ :push the saved location used for `bzr push` with no arguments
68+ :this this branch
69+
70+For example, to push to the parent location::
71+
72+ bzr push :parent
73+

Subscribers

People subscribed via source and target branches