Merge lp:~tseaver/loggerhead/sphinxify into lp:loggerhead

Proposed by Tres Seaver on 2010-03-23
Status: Merged
Merged at revision: not available
Proposed branch: lp:~tseaver/loggerhead/sphinxify
Merge into: lp:loggerhead
Diff against target: 835 lines (+789/-0)
8 files modified
.bzrignore (+2/-0)
docs/Makefile (+89/-0)
docs/conf.py (+194/-0)
docs/index.rst (+211/-0)
docs/make.bat (+113/-0)
docs/serve-branches.rst (+116/-0)
docs/start-loggerhead.rst (+46/-0)
docs/stop-loggerhead.rst (+18/-0)
To merge this branch: bzr merge lp:~tseaver/loggerhead/sphinxify
Reviewer Review Type Date Requested Status
Ian Clatworthy (community) Approve on 2010-04-13
Matt Nordhoff 2010-03-23 Needs Fixing on 2010-03-25
Review via email: mp+21948@code.launchpad.net

Description of the Change

Add Sphinx-based documentation to the source tree.

To post a comment you must log in.
lp:~tseaver/loggerhead/sphinxify updated on 2010-03-23
403. By Tres Seaver <email address hidden> on 2010-03-23

ReST fixups, better cross-references.

404. By Tres Seaver <email address hidden> on 2010-03-23

Explain plugin usage, link bazaar-webserve and hgweb.

405. By Tres Seaver <email address hidden> on 2010-03-23

Move cross-ref of bazaar-webserve and hgweb to intro graph; remove dead modindex and search.

406. By Tres Seaver <email address hidden> on 2010-03-23

Better section title.

Matt Nordhoff (mnordhoff) wrote :

Some small comments on part of it (I'm watching TV now...):

> 317 +oggerhead is heavily based on `bazaar-webserve

Missing an L in "Loggerhead". ;-)

> 331 +- Paste for the server. (You need version 1.2 or newer of Paste.)
> 332 +
> 333 +- Paste Deploy (optional, needed when proxying through Apache)
> 334 +
> 335 +- flup (optional, needed to use FastCGI, SCGI or AJP)

The style is rather inconsistent here -- the spacing and "(foo)" vs. "(Foo.)".

Also, what should be done with the README now?

Matt Nordhoff (mnordhoff) wrote :

A couple spots use "loggerhead"; I'd prefer "Loggerhead". Not a big deal, though.

> 730 + Setting this option keeps loggerhead from adding a 'readonly+' prefix
> 731 + to the base URL of is to make visible the display of instructions for
> 732 + checking out the 'public_branch' URL for the branch being browsed.

That...what? "base URL of is to make"?

If it ever includes "readonly+" in URL in the example instructions, that's a bug. Aside from that, --allow-writes isn't really related to the instructions; it's about how the server itself works.

> 810 + Override configuration file location [XXX default is
> 811 + :file:`/etc/loggerhead.conf`]

> 815 + The directory [XXX in which] to place log files

XXX comments?

Mostly this sounds really cool. Thank you. :-)

If someone who has Sphinx installed can confirm that the syntax isn't horribly wrong or something (or maybe I'll do it myself later), I'd be happy to land it, once these (minor) issues are fixed. Even if it isn't perfect, it's certainly an improvement over Loggerhead's current documentation situation. "Don't let the perfect be the enemy of the good" and all.

bb:tweak

review: Needs Fixing
lp:~tseaver/loggerhead/sphinxify updated on 2010-03-25
407. By Tres Seaver <email address hidden> on 2010-03-23

Better section title.

408. By Tres Seaver <email address hidden> on 2010-03-25

Use 'Loggerhead' as the display name; fix typos.

409. By Tres Seaver <email address hidden> on 2010-03-25

Consistent punctuation.

Tres Seaver (tseaver) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt Nordhoff wrote:
> Some small comments on part of it (I'm watching TV now...):
>
>> 317 +oggerhead is heavily based on `bazaar-webserve
>
> Missing an L in "Loggerhead". ;-)

Fixed in r408 of my branch.

>> 331 +- Paste for the server. (You need version 1.2 or newer of Paste.)
>> 332 +
>> 333 +- Paste Deploy (optional, needed when proxying through Apache)
>> 334 +
>> 335 +- flup (optional, needed to use FastCGI, SCGI or AJP)
>
> The style is rather inconsistent here -- the spacing and "(foo)" vs. "(Foo.)".

Fixed in r409 of my branch.

> Also, what should be done with the README now?

Most projects I know using Sphinx remove the bulk of the information
from the README, leaving behind a pointer to the Sphinx docs. I wasn't
sure how you would want to handle that: I can push a changeset with a
suggested diff for the README if you like.

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkurO1QACgkQ+gerLs4ltQ4TFACgtiYb2dawlxWfHOIoV2LlZEsr
xXIAoJDYXKUt8jhVbHxqbTP703fHrrz2
=W3GW
-----END PGP SIGNATURE-----

lp:~tseaver/loggerhead/sphinxify updated on 2010-03-25
410. By Tres Seaver <email address hidden> on 2010-03-25

Try to clarify my reverse-engineered explanation of --allow-writes semantics.

411. By Tres Seaver <email address hidden> on 2010-03-25

Consistent punctuation, capitalization; remove XXX.

Tres Seaver (tseaver) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt Nordhoff wrote:
> Review: Needs Fixing
> A couple spots use "loggerhead"; I'd prefer "Loggerhead". Not a big deal, though.

Fix included in r408 of my branch.

>> 730 + Setting this option keeps loggerhead from adding a 'readonly+' prefix
>> 731 + to the base URL of is to make visible the display of instructions for
>> 732 + checking out the 'public_branch' URL for the branch being browsed.
>
> That...what? "base URL of is to make"?

Sorry for the typo. r410 tries to clarify.

> If it ever includes "readonly+" in URL in the example instructions,
> that's a bug. Aside from that, --allow-writes isn't really related to
> the instructions; it's about how the server itself works.

I was trying to document what effect the option actualy has, by
spelunking the code. From my exploration, it appears that the option
has a somewhat misleading name: it doesn't appear to make the
Loggerhead server willing to accept any changes from clients (in fact,
in my experience, I have to serve a "raw" bzr tree from another URL to
allow even a checkout).

At any rate, I might be completely wrong about the intended (or actual)
semantics. I do know that passing '--allow-writes' on the command line
was the only way I found to get the branch UI to show the block of HTML
which gives directions for checking out the branch.

>> 810 + Override configuration file location [XXX default is
>> 811 + :file:`/etc/loggerhead.conf`]
>
>> 815 + The directory [XXX in which] to place log files
>
> XXX comments?

Fossils from my efforts to reverse engineer from the manpage source: I
have elided them in r411.

> Mostly this sounds really cool. Thank you. :-)
>
> If someone who has Sphinx installed can confirm that the syntax isn't
> horribly wrong or something (or maybe I'll do it myself later), I'd be
> happy to land it, once these (minor) issues are fixed. Even if it isn't
> perfect, it's certainly an improvement over Loggerhead's current
> documentation situation. "Don't let the perfect be the enemy of the
> good" and all.

I'm glad it helps. Sphinx has been a big win for us on the repoze project.

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkurPtoACgkQ+gerLs4ltQ5uvgCdHGEM+TBqNvhQEqAkWP3fiylt
wtMAoJoqpzsBBvt/JuZWmgMJMUkoKl0P
=gvDH
-----END PGP SIGNATURE-----

Matt Nordhoff (mnordhoff) wrote :

Tres Seaver wrote:
> I was trying to document what effect the option actualy has, by
> spelunking the code. From my exploration, it appears that the option
> has a somewhat misleading name: it doesn't appear to make the
> Loggerhead server willing to accept any changes from clients (in fact,
> in my experience, I have to serve a "raw" bzr tree from another URL to
> allow even a checkout).
>
> At any rate, I might be completely wrong about the intended (or actual)
> semantics. I do know that passing '--allow-writes' on the command line
> was the only way I found to get the branch UI to show the block of HTML
> which gives directions for checking out the branch.

--allow-writes is supposed to simply allow pushing to the smart server,
and have no impact on the "bzr branch" example.

This wouldn't be the first time it's gotten broken, though...

The "bzr branch" example should always be displayed, unless you're
serving a remote location (e.g. "serve-branches bzr+ssh://...") and the
branch has no public_branch setting. Hmm, looking at the code, I may
have already spotted an issue, though.
--
Matt Nordhoff

Matt Nordhoff (mnordhoff) wrote :

Matt Nordhoff wrote:
> --allow-writes is supposed to simply allow pushing to the smart server,
> and have no impact on the "bzr branch" example.

I meant to add that that makes it equivalent to "bzr serve
--allow-writes", which makes it extremely dangerous. Without some sort
of auth setup, and if Loggerhead's user has write access to the
directory tree you're serving, anyone can use bzrlib to screw with it.
--
Matt Nordhoff

Matt Nordhoff (mnordhoff) wrote :

There should be NEWS, too. :D (Which can be added by whoever lands this.)

Matt Nordhoff (mnordhoff) wrote :

Matt Nordhoff wrote:
> Tres Seaver wrote:
> > I was trying to document what effect the option actualy has, by
> > spelunking the code. From my exploration, it appears that the option
> > has a somewhat misleading name: it doesn't appear to make the
> > Loggerhead server willing to accept any changes from clients (in fact,
> > in my experience, I have to serve a "raw" bzr tree from another URL to
> > allow even a checkout).
> >
> > At any rate, I might be completely wrong about the intended (or actual)
> > semantics. I do know that passing '--allow-writes' on the command line
> > was the only way I found to get the branch UI to show the block of HTML
> > which gives directions for checking out the branch.
>
> --allow-writes is supposed to simply allow pushing to the smart server,
> and have no impact on the "bzr branch" example.
>
> This wouldn't be the first time it's gotten broken, though...
>
> The "bzr branch" example should always be displayed, unless you're
> serving a remote location (e.g. "serve-branches bzr+ssh://...") and the
> branch has no public_branch setting. Hmm, looking at the code, I may
> have already spotted an issue, though.

Following up on this, I sent a merge proposal to fix the "To get this branch" bit, and I tested --allow-writes and it's working as expected.

Tres Seaver (tseaver) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt Nordhoff wrote:
> Matt Nordhoff wrote:
>> Tres Seaver wrote:
>>> I was trying to document what effect the option actualy has, by
>>> spelunking the code. From my exploration, it appears that the option
>>> has a somewhat misleading name: it doesn't appear to make the
>>> Loggerhead server willing to accept any changes from clients (in fact,
>>> in my experience, I have to serve a "raw" bzr tree from another URL to
>>> allow even a checkout).
>>>
>>> At any rate, I might be completely wrong about the intended (or actual)
>>> semantics. I do know that passing '--allow-writes' on the command line
>>> was the only way I found to get the branch UI to show the block of HTML
>>> which gives directions for checking out the branch.
>> --allow-writes is supposed to simply allow pushing to the smart server,
>> and have no impact on the "bzr branch" example.
>>
>> This wouldn't be the first time it's gotten broken, though...
>>
>> The "bzr branch" example should always be displayed, unless you're
>> serving a remote location (e.g. "serve-branches bzr+ssh://...") and the
>> branch has no public_branch setting. Hmm, looking at the code, I may
>> have already spotted an issue, though.
>
> Following up on this, I sent a merge proposal to fix the "To get this
> branch" bit, and I tested --allow-writes and it's working as
> expected.

I was able to test your branch:

  lp:~mnordhoff/loggerhead/readonly_local_path_from_url/

and the fix for showing branchinfo HTML is working with '--allow-writes'
turned off for me. Upgrading to that branch made the "local" checkouts
work again, too (I had been running on the 1.17.0 release of loggerhead).

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkurl88ACgkQ+gerLs4ltQ7v2QCgm1mXOu9wf7qjab6TNU5u+Yyn
HDEAoMy8jbGvT8b2TZZAVA+Ibg+iDixp
=f3oV
-----END PGP SIGNATURE-----

Ian Clatworthy (ian-clatworthy) wrote :

Tres,

This is awesome - thanks. I'll add a NEWS entry and merge.

A question: why multiple lines in .bzrignore, as opposed to just adding ./build/?

review: Approve
Ian Clatworthy (ian-clatworthy) wrote :

This is merged now. I made some very minor tweaks to index.rst, updated the README and added a NEWS item while merging. If there are any problems with my tweaks, please let me know.

Tres Seaver (tseaver) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Clatworthy wrote:

> This is awesome - thanks. I'll add a NEWS entry and merge.

Great!

> A question: why multiple lines in .bzrignore, as opposed to just adding ./build/?

Maybe my bzr-fu isn't strong enough: at least with a Subversion
project, you want the 'docs/_build' directory to be in the repository
(because the Makefile won't create it), but want to ignore anything
which is created inside it by the build process. The two lines could
probably just be 'docs/_build/*'. Or did the existing 'build' entry
already prevent anything from being noticed in that directory?

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvEeVQACgkQ+gerLs4ltQ5qogCgmHuwMhCwy2g09GcITpWVzj/p
ESYAoMzUkala/ODJcB4lXmKCvhrDq2d7
=jHmY
-----END PGP SIGNATURE-----

Ian Clatworthy (ian-clatworthy) wrote :

On 14/04/10 00:03, Tres Seaver wrote:

> The two lines could
> probably just be 'docs/_build/*'.

Yes. Or ./docs/_build/

I've simplified it accordingly.

> Or did the existing 'build' entry
> already prevent anything from being noticed in that directory?

No, the existing build entry will mask out ./build/ or docs/build/ but
not docs/_build.

Ian C.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2009-04-01 14:40:05 +0000
3+++ .bzrignore 2010-03-25 10:44:29 +0000
4@@ -7,3 +7,5 @@
5 *.log
6 _trial_temp
7 loggerhead-memprofile
8+docs/_build/doctrees
9+docs/_build/html
10
11=== added directory 'docs'
12=== added file 'docs/Makefile'
13--- docs/Makefile 1970-01-01 00:00:00 +0000
14+++ docs/Makefile 2010-03-25 10:44:29 +0000
15@@ -0,0 +1,89 @@
16+# Makefile for Sphinx documentation
17+#
18+
19+# You can set these variables from the command line.
20+SPHINXOPTS =
21+SPHINXBUILD = sphinx-build
22+PAPER =
23+BUILDDIR = _build
24+
25+# Internal variables.
26+PAPEROPT_a4 = -D latex_paper_size=a4
27+PAPEROPT_letter = -D latex_paper_size=letter
28+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
29+
30+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
31+
32+help:
33+ @echo "Please use \`make <target>' where <target> is one of"
34+ @echo " html to make standalone HTML files"
35+ @echo " dirhtml to make HTML files named index.html in directories"
36+ @echo " pickle to make pickle files"
37+ @echo " json to make JSON files"
38+ @echo " htmlhelp to make HTML files and a HTML help project"
39+ @echo " qthelp to make HTML files and a qthelp project"
40+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
41+ @echo " changes to make an overview of all changed/added/deprecated items"
42+ @echo " linkcheck to check all external links for integrity"
43+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
44+
45+clean:
46+ -rm -rf $(BUILDDIR)/*
47+
48+html:
49+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
50+ @echo
51+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
52+
53+dirhtml:
54+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
55+ @echo
56+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
57+
58+pickle:
59+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
60+ @echo
61+ @echo "Build finished; now you can process the pickle files."
62+
63+json:
64+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
65+ @echo
66+ @echo "Build finished; now you can process the JSON files."
67+
68+htmlhelp:
69+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
70+ @echo
71+ @echo "Build finished; now you can run HTML Help Workshop with the" \
72+ ".hhp project file in $(BUILDDIR)/htmlhelp."
73+
74+qthelp:
75+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
76+ @echo
77+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
78+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
79+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/loggerhead.qhcp"
80+ @echo "To view the help file:"
81+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/loggerhead.qhc"
82+
83+latex:
84+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
85+ @echo
86+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
87+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
88+ "run these through (pdf)latex."
89+
90+changes:
91+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
92+ @echo
93+ @echo "The overview file is in $(BUILDDIR)/changes."
94+
95+linkcheck:
96+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
97+ @echo
98+ @echo "Link check complete; look for any errors in the above output " \
99+ "or in $(BUILDDIR)/linkcheck/output.txt."
100+
101+doctest:
102+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
103+ @echo "Testing of doctests in the sources finished, look at the " \
104+ "results in $(BUILDDIR)/doctest/output.txt."
105
106=== added directory 'docs/_build'
107=== added directory 'docs/_static'
108=== added directory 'docs/_templates'
109=== added file 'docs/conf.py'
110--- docs/conf.py 1970-01-01 00:00:00 +0000
111+++ docs/conf.py 2010-03-25 10:44:29 +0000
112@@ -0,0 +1,194 @@
113+# -*- coding: utf-8 -*-
114+#
115+# loggerhead documentation build configuration file, created by
116+# sphinx-quickstart on Tue Mar 23 10:49:50 2010.
117+#
118+# This file is execfile()d with the current directory set to its containing dir.
119+#
120+# Note that not all possible configuration values are present in this
121+# autogenerated file.
122+#
123+# All configuration values have a default; values that are commented out
124+# serve to show the default.
125+
126+import sys, os
127+
128+# If extensions (or modules to document with autodoc) are in another directory,
129+# add these directories to sys.path here. If the directory is relative to the
130+# documentation root, use os.path.abspath to make it absolute, like shown here.
131+#sys.path.append(os.path.abspath('.'))
132+
133+# -- General configuration -----------------------------------------------------
134+
135+# Add any Sphinx extension module names here, as strings. They can be extensions
136+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
137+extensions = []
138+
139+# Add any paths that contain templates here, relative to this directory.
140+templates_path = ['_templates']
141+
142+# The suffix of source filenames.
143+source_suffix = '.rst'
144+
145+# The encoding of source files.
146+#source_encoding = 'utf-8'
147+
148+# The master toctree document.
149+master_doc = 'index'
150+
151+# General information about the project.
152+project = u'Loggerhead'
153+copyright = u'2010, Loggerhead team (https://launchpad.net/~loggerhead-team)'
154+
155+# The version info for the project you're documenting, acts as replacement for
156+# |version| and |release|, also used in various other places throughout the
157+# built documents.
158+#
159+# The short X.Y version.
160+version = '1.17'
161+# The full version, including alpha/beta/rc tags.
162+release = '1.17'
163+
164+# The language for content autogenerated by Sphinx. Refer to documentation
165+# for a list of supported languages.
166+#language = None
167+
168+# There are two options for replacing |today|: either, you set today to some
169+# non-false value, then it is used:
170+#today = ''
171+# Else, today_fmt is used as the format for a strftime call.
172+#today_fmt = '%B %d, %Y'
173+
174+# List of documents that shouldn't be included in the build.
175+#unused_docs = []
176+
177+# List of directories, relative to source directory, that shouldn't be searched
178+# for source files.
179+exclude_trees = ['_build']
180+
181+# The reST default role (used for this markup: `text`) to use for all documents.
182+#default_role = None
183+
184+# If true, '()' will be appended to :func: etc. cross-reference text.
185+#add_function_parentheses = True
186+
187+# If true, the current module name will be prepended to all description
188+# unit titles (such as .. function::).
189+#add_module_names = True
190+
191+# If true, sectionauthor and moduleauthor directives will be shown in the
192+# output. They are ignored by default.
193+#show_authors = False
194+
195+# The name of the Pygments (syntax highlighting) style to use.
196+pygments_style = 'sphinx'
197+
198+# A list of ignored prefixes for module index sorting.
199+#modindex_common_prefix = []
200+
201+
202+# -- Options for HTML output ---------------------------------------------------
203+
204+# The theme to use for HTML and HTML Help pages. Major themes that come with
205+# Sphinx are currently 'default' and 'sphinxdoc'.
206+html_theme = 'default'
207+
208+# Theme options are theme-specific and customize the look and feel of a theme
209+# further. For a list of options available for each theme, see the
210+# documentation.
211+#html_theme_options = {}
212+
213+# Add any paths that contain custom themes here, relative to this directory.
214+#html_theme_path = []
215+
216+# The name for this set of Sphinx documents. If None, it defaults to
217+# "<project> v<release> documentation".
218+#html_title = None
219+
220+# A shorter title for the navigation bar. Default is the same as html_title.
221+#html_short_title = None
222+
223+# The name of an image file (relative to this directory) to place at the top
224+# of the sidebar.
225+#html_logo = None
226+
227+# The name of an image file (within the static path) to use as favicon of the
228+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
229+# pixels large.
230+#html_favicon = None
231+
232+# Add any paths that contain custom static files (such as style sheets) here,
233+# relative to this directory. They are copied after the builtin static files,
234+# so a file named "default.css" will overwrite the builtin "default.css".
235+html_static_path = ['_static']
236+
237+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
238+# using the given strftime format.
239+#html_last_updated_fmt = '%b %d, %Y'
240+
241+# If true, SmartyPants will be used to convert quotes and dashes to
242+# typographically correct entities.
243+#html_use_smartypants = True
244+
245+# Custom sidebar templates, maps document names to template names.
246+#html_sidebars = {}
247+
248+# Additional templates that should be rendered to pages, maps page names to
249+# template names.
250+#html_additional_pages = {}
251+
252+# If false, no module index is generated.
253+#html_use_modindex = True
254+
255+# If false, no index is generated.
256+#html_use_index = True
257+
258+# If true, the index is split into individual pages for each letter.
259+#html_split_index = False
260+
261+# If true, links to the reST sources are added to the pages.
262+#html_show_sourcelink = True
263+
264+# If true, an OpenSearch description file will be output, and all pages will
265+# contain a <link> tag referring to it. The value of this option must be the
266+# base URL from which the finished HTML is served.
267+#html_use_opensearch = ''
268+
269+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
270+#html_file_suffix = ''
271+
272+# Output file base name for HTML help builder.
273+htmlhelp_basename = 'loggerheaddoc'
274+
275+
276+# -- Options for LaTeX output --------------------------------------------------
277+
278+# The paper size ('letter' or 'a4').
279+#latex_paper_size = 'letter'
280+
281+# The font size ('10pt', '11pt' or '12pt').
282+#latex_font_size = '10pt'
283+
284+# Grouping the document tree into LaTeX files. List of tuples
285+# (source start file, target name, title, author, documentclass [howto/manual]).
286+latex_documents = [
287+ ('index', 'loggerhead.tex', u'Loggerhead Documentation',
288+ u'Loggerhead team (https://launchpad.net/\\textasciitilde{}loggerhead-team)', 'manual'),
289+]
290+
291+# The name of an image file (relative to this directory) to place at the top of
292+# the title page.
293+#latex_logo = None
294+
295+# For "manual" documents, if this is true, then toplevel headings are parts,
296+# not chapters.
297+#latex_use_parts = False
298+
299+# Additional stuff for the LaTeX preamble.
300+#latex_preamble = ''
301+
302+# Documents to append as an appendix to all manuals.
303+#latex_appendices = []
304+
305+# If false, no module index is generated.
306+#latex_use_modindex = True
307
308=== added file 'docs/index.rst'
309--- docs/index.rst 1970-01-01 00:00:00 +0000
310+++ docs/index.rst 2010-03-25 10:44:29 +0000
311@@ -0,0 +1,211 @@
312+Loggerhead: A web viewer for ``bzr`` branches
313+==============================================
314+
315+Loggerhead is a web viewer for projects in bazaar. It can be used to navigate
316+a branch history, annotate files, view patches, perform searches, etc.
317+Loggerhead is heavily based on `bazaar-webserve
318+<https://launchpad.net/bzr-webserve>`_, which was, in turn, loosely
319+based on `hgweb <http://mercurial.selenic.com/wiki/HgWebDirStepByStep>`_.
320+
321+
322+Getting Started
323+---------------
324+
325+Loggerhead depends on the following Python libraries.:
326+
327+- SimpleTAL for templating.
328+
329+- simplejson for producing JSON data.
330+
331+- Paste for the server. (You need version 1.2 or newer of Paste).
332+
333+- Paste Deploy (optional, needed when proxying through Apache).
334+
335+- flup (optional, needed to use FastCGI, SCGI or AJP).
336+
337+
338+Installing Dependencies Using Ubuntu Packages
339+#############################################
340+
341+.. code-block:: sh
342+
343+ $ sudo apt-get install python-simpletal
344+ $ sudo apt-get install python-simplejson
345+ $ sudo apt-get install python-paste
346+ $ sudo apt-get install python-pastedeploy
347+ $ sudo apt-get install python-flup
348+
349+Installing Dependencies Using :command:`easy_install`
350+#####################################################
351+
352+.. code-block:: sh
353+
354+ $ easy_install \
355+ -f http://www.owlfish.com/software/simpleTAL/py2compatible/download.html \
356+ SimpleTAL
357+ $ easy_install simplejson
358+ $ easy_install Paste
359+ $ easy_install PasteDeploy
360+ $ easy_install flup
361+
362+
363+Running the Standalone Loggerhead Server
364+----------------------------------------
365+
366+After installing all the dependencies, you should be able to run
367+:command:`serve-branches` with the branch you want to serve on the
368+command line:
369+
370+.. code-block:: sh
371+
372+ ./serve-branches ~/path/to/branch
373+
374+By default, the script listens on port 8080, so head to
375+http://localhost:8080/ in your browser to see the branch.
376+
377+You can also pass a directory that contains branches to the script,
378+and it will serve a very simple directory listing at other pages.
379+
380+You may update the Bazaar branches being viewed at any time.
381+Loggerhead will notice and refresh, and Bazaar uses its own branch
382+locking to prevent corruption.
383+
384+See :doc:`serve-branches` for all command line options.
385+
386+Running Loggerhead as a Daemon
387+------------------------------
388+
389+To run Loggerhead as a linux daemon:
390+
391+1) Copy the ``loggerheadd`` scipt to ``/etc/init.d``
392+
393+.. code-block:: sh
394+
395+ $ sudo cp ./loggerheadd /etc/init.d
396+
397+2) Edit the file to configure where your Loggerhead is installed, and which
398+ serve-branches options you would like.
399+
400+.. code-block:: sh
401+
402+ $ sudo vim /etc/init.d/loggerheadd
403+
404+3) Register the service
405+
406+.. code-block:: sh
407+
408+ # on upstart based systems like Ubuntu run:
409+ $ sudo update-rc.d loggerheadd defaults
410+
411+ # on Sysvinit based systems like Centos or SuSE run:
412+ $ sudo chkconfig --add loggerheadd
413+
414+
415+Using Loggerhead as a Bazaar Plugin
416+------------------------------------
417+
418+This branch contains experimental support for using Loggerhead as a Bazaar
419+plugin. To use it, place the top-level Loggerhead directory (the one
420+containing this file) at ``~/.bazaar/plugins/loggerhead``. E.g.:
421+
422+.. code-block:: sh
423+
424+ $ bzr branch lp:loggerhead ~/.bazaar/plugins/loggerhead
425+ $ cd ~/myproject
426+ $ bzr serve --http
427+
428+
429+Using a Config File
430+-------------------
431+
432+To hide branches from being displayed, add to ``~/.bazaar/locations.conf``,
433+under the branch's section:
434+
435+.. code-block:: ini
436+
437+ [/path/to/branch]
438+ http_serve = False
439+
440+More configuration options to come soon.
441+
442+
443+Serving Loggerhead behind Apache
444+--------------------------------
445+
446+If you want to view Bazaar branches from your existing Apache
447+installation, you'll need to configure Apache to proxy certain
448+requests to Loggerhead. Adding lines like this to you Apache
449+configuration is one way to do this:
450+
451+.. code-block:: apache
452+
453+ <Location "/branches/">
454+ ProxyPass http://127.0.0.1:8080/branches/
455+ ProxyPassReverse http://127.0.0.1:8080/branches/
456+ </Location>
457+
458+If Paste Deploy is installed, the :command:`serve-branches` script can be
459+run behind a proxy at the root of a site, but if you're running it at
460+some path into the site, you'll need to specify is using
461+``--prefix=/some_path``.
462+
463+
464+Search
465+------
466+
467+Search is currently supported by using the bzr-search plugin (available
468+at: https://launchpad.net/bzr-search ).
469+
470+You need to have the plugin installed and each branch indexed to allow
471+searching on branches.
472+
473+Command-Line Reference
474+----------------------
475+
476+.. toctree::
477+ :maxdepth: 2
478+
479+ serve-branches
480+ start-loggerhead
481+ stop-loggerhead
482+
483+
484+Support
485+-------
486+
487+Discussion should take place on the bazaar-dev mailing list at
488+mailto:bazaar@lists.canonical.com. You can join the list at
489+<https://lists.ubuntu.com/mailman/listinfo/bazaar>. You don't need to
490+subscribe to post, but your first post will be held briefly for manual
491+moderation.
492+
493+Bugs are tracked on Launchpad; start at:
494+
495+ https://bugs.launchpad.net/loggerhead
496+
497+
498+Hacking
499+-------
500+
501+To run Loggerhead tests, you will need to install the package ``python-nose``,
502+and run its :command:`nosetests` script in the Loggerhead directory:
503+
504+.. code-block:: sh
505+
506+ nosetests
507+
508+
509+License
510+-------
511+
512+GNU GPLv2 or later.
513+
514+See Also
515+--------
516+
517+https://launchpad.net/loggerhead
518+
519+Index
520+=====
521+
522+- :ref:`genindex`
523
524=== added file 'docs/make.bat'
525--- docs/make.bat 1970-01-01 00:00:00 +0000
526+++ docs/make.bat 2010-03-25 10:44:29 +0000
527@@ -0,0 +1,113 @@
528+@ECHO OFF
529+
530+REM Command file for Sphinx documentation
531+
532+set SPHINXBUILD=sphinx-build
533+set BUILDDIR=_build
534+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
535+if NOT "%PAPER%" == "" (
536+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
537+)
538+
539+if "%1" == "" goto help
540+
541+if "%1" == "help" (
542+ :help
543+ echo.Please use `make ^<target^>` where ^<target^> is one of
544+ echo. html to make standalone HTML files
545+ echo. dirhtml to make HTML files named index.html in directories
546+ echo. pickle to make pickle files
547+ echo. json to make JSON files
548+ echo. htmlhelp to make HTML files and a HTML help project
549+ echo. qthelp to make HTML files and a qthelp project
550+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
551+ echo. changes to make an overview over all changed/added/deprecated items
552+ echo. linkcheck to check all external links for integrity
553+ echo. doctest to run all doctests embedded in the documentation if enabled
554+ goto end
555+)
556+
557+if "%1" == "clean" (
558+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
559+ del /q /s %BUILDDIR%\*
560+ goto end
561+)
562+
563+if "%1" == "html" (
564+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
565+ echo.
566+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
567+ goto end
568+)
569+
570+if "%1" == "dirhtml" (
571+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
572+ echo.
573+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
574+ goto end
575+)
576+
577+if "%1" == "pickle" (
578+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
579+ echo.
580+ echo.Build finished; now you can process the pickle files.
581+ goto end
582+)
583+
584+if "%1" == "json" (
585+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
586+ echo.
587+ echo.Build finished; now you can process the JSON files.
588+ goto end
589+)
590+
591+if "%1" == "htmlhelp" (
592+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
593+ echo.
594+ echo.Build finished; now you can run HTML Help Workshop with the ^
595+.hhp project file in %BUILDDIR%/htmlhelp.
596+ goto end
597+)
598+
599+if "%1" == "qthelp" (
600+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
601+ echo.
602+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
603+.qhcp project file in %BUILDDIR%/qthelp, like this:
604+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\loggerhead.qhcp
605+ echo.To view the help file:
606+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\loggerhead.ghc
607+ goto end
608+)
609+
610+if "%1" == "latex" (
611+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
612+ echo.
613+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
614+ goto end
615+)
616+
617+if "%1" == "changes" (
618+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
619+ echo.
620+ echo.The overview file is in %BUILDDIR%/changes.
621+ goto end
622+)
623+
624+if "%1" == "linkcheck" (
625+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
626+ echo.
627+ echo.Link check complete; look for any errors in the above output ^
628+or in %BUILDDIR%/linkcheck/output.txt.
629+ goto end
630+)
631+
632+if "%1" == "doctest" (
633+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
634+ echo.
635+ echo.Testing of doctests in the sources finished, look at the ^
636+results in %BUILDDIR%/doctest/output.txt.
637+ goto end
638+)
639+
640+:end
641
642=== added file 'docs/serve-branches.rst'
643--- docs/serve-branches.rst 1970-01-01 00:00:00 +0000
644+++ docs/serve-branches.rst 2010-03-25 10:44:29 +0000
645@@ -0,0 +1,116 @@
646+:command:`serve-branches`
647+=========================
648+
649+The :command:`serve-branches` script runs a standalone Loggerhead server in
650+the foreground.
651+
652+.. program:: serve-branches
653+
654+Usage
655+-----
656+
657+.. code-block:: sh
658+
659+ serve-branches [OPTIONS] <target directory>
660+
661+Options
662+-------
663+
664+.. cmdoption:: --user-dirs
665+
666+ Serve user directories as ``~user`` (requires ``--trunk-dir``).
667+
668+ If both options are set, then for requests where the CGI ``PATH_INFO``
669+ starts with "/~<name>", serve branches under the <name> directory.
670+
671+.. cmdoption:: --trunk-dir=DIR
672+
673+ The directory that contains the trunk branches (requires ``--user-dirs``).
674+
675+ If both options are set, then for requests where the CGI ``PATH_INFO``
676+ does not start with "/~<name>", serve branches under DIR.
677+
678+.. cmdoption:: --port
679+
680+ Listen on the given port.
681+
682+ Defaults to 8080.
683+
684+.. cmdoption:: --host
685+
686+ Listen on the interface corresponding to the given IP.
687+
688+ Defaults to listening on all interfaces, i.e., "0.0.0.0".
689+
690+.. cmdoption:: --protocol
691+
692+ Serve the application using the specified protocol.
693+
694+ Can be one of: "http", "scgi", "fcgi", "ajp" (defaults to "http").
695+
696+.. cmdoption:: --prefix
697+
698+ Set the supplied value as the CGI ``SCRIPT_NAME`` for the application.
699+
700+ This option is intended for use when serving Loggerhead behind a
701+ reverse proxy, with Loggerhead being "mounted" at a directory below
702+ the root. E.g., if the reverse proxy translates requests for
703+ ``http://example.com/loggerhead`` onto the standalone Loggerhead process,
704+ that process should be run with ``--prefix=/loggerhead``.
705+
706+.. cmdoption:: --log-folder=LOG_FOLDER
707+
708+ The directory in which to place Loggerhead's log files.
709+
710+ Defaults to the current directory.
711+
712+.. cmdoption:: --cache-dir=SQL_CACHE_DIR
713+
714+ The directory in which to place the SQL cache.
715+
716+ Defaults to the current directory.
717+
718+.. cmdoption:: --use-cdn
719+
720+ Serve YUI javascript libraries from Yahoo!'s CDN.
721+
722+.. cmdoption:: --allow-writes
723+
724+ Allow writing to the Bazaar server.
725+
726+ Setting this option keeps Loggerhead from adding a 'readonly+' prefix
727+ to the base URL of the branch. The only effect of suppressing this prefix
728+ is to make visible the display of instructions for checking out the
729+ 'public_branch' URL for the branch being browsed.
730+
731+.. cmdoption:: -h, --help
732+
733+ Print the help message and exit
734+
735+.. cmdoption:: --version
736+
737+ Print the software version and exit.
738+
739+Debugging Options
740+-----------------
741+
742+The following options are only useful when developing / debugging Loggerhead
743+itself.
744+
745+.. cmdoption:: --profile
746+
747+ Generate per-request callgrind profile data.
748+
749+ Data for each request is written to a file ``%d-stats.callgrind``,
750+ where ``%d`` is replaced by the sequence number of the request.
751+
752+.. cmdoption:: --memory-profile
753+
754+ Profile the memory usage using the `Dozer
755+ <http://pypi.python.org/pypi/Dozer>`_ middleware.
756+
757+.. cmdoption:: --reload
758+
759+ Restart the application when any of its python file change.
760+
761+ This option should only used for development purposes.
762
763=== added file 'docs/start-loggerhead.rst'
764--- docs/start-loggerhead.rst 1970-01-01 00:00:00 +0000
765+++ docs/start-loggerhead.rst 2010-03-25 10:44:29 +0000
766@@ -0,0 +1,46 @@
767+:command:`start-loggerhead`
768+===========================
769+
770+The :command:`start-loggerhead` command starts a new standalone Loggerhead
771+server. By default, the server runs in the background (daemonized).
772+
773+.. program:: start-loggerhead
774+
775+Usage
776+-----
777+
778+.. code-block:: sh
779+
780+ start-loggerhead [OPTIONS]
781+
782+Options
783+-------
784+
785+.. cmdoption:: --version
786+
787+ Print the software version and exit.
788+
789+.. cmdoption:: -h, --help
790+
791+ Show this help message and exit.
792+
793+.. cmdoption:: --foreground
794+
795+ Run in the foreground; don't daemonize.
796+
797+.. cmdoption:: -C, --check
798+
799+ Only start if not already running (useful for cron jobs).
800+
801+.. cmdoption:: -p, --pidfile=PIDFILE
802+
803+ Override pid file location.
804+
805+.. cmdoption:: -c, --config-file=CONFIGFILE
806+
807+ Override configuration file location (the default is
808+ :file:`/etc/loggerhead.conf`).
809+
810+.. cmdoption:: --log-folder=LOG_FOLDER
811+
812+ The directory in which to place log files.
813
814=== added file 'docs/stop-loggerhead.rst'
815--- docs/stop-loggerhead.rst 1970-01-01 00:00:00 +0000
816+++ docs/stop-loggerhead.rst 2010-03-25 10:44:29 +0000
817@@ -0,0 +1,18 @@
818+:command:`stop-loggerhead`
819+======================================================================
820+
821+The :command:`stop-loggerhead` command stops the currently running Loggerhead
822+daemon.
823+
824+.. program:: stop-loggerhead
825+
826+Usage
827+-----
828+
829+.. code-block:: sh
830+
831+ stop-loggerhead [OPTIONS]
832+
833+.. cmdoption:: -p, --pidfile=PIDFILE
834+
835+ override pid file location

Subscribers

People subscribed via source and target branches