Merge lp:~rockstar/tarmac/tarmac-docs into lp:tarmac

Proposed by Paul Hummer
Status: Merged
Approved by: Paul Hummer
Approved revision: 384
Merged at revision: 379
Proposed branch: lp:~rockstar/tarmac/tarmac-docs
Merge into: lp:tarmac
Diff against target: 159 lines (+65/-53)
4 files modified
README (+2/-53)
docs/introduction.txt (+43/-0)
tarmac/bin/commands.py (+15/-0)
tarmac/bin/registry.py (+5/-0)
To merge this branch: bzr merge lp:~rockstar/tarmac/tarmac-docs
Reviewer Review Type Date Requested Status
dobey Approve
Review via email: mp+39309@code.launchpad.net

Commit message

Fix documentation bugs.

Description of the change

This branch fixes a bunch of documentation bugs that existed, and while I was at it, I fixed a few facepalm issues that mars discovered as he was messing with tarmac.

I basically removed all useful information from the README, and just pointed it to docs/introduction.txt. I did this because they were essentially saying the same thing.

To post a comment you must log in.
lp:~rockstar/tarmac/tarmac-docs updated
384. By Paul Hummer

Fixed the cron job

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2009-07-11 04:18:18 +0000
3+++ README 2010-10-26 01:04:00 +0000
4@@ -1,53 +1,2 @@
5-Introduction
6-============
7-
8-The Tarmac Launchpad Branch Lander automatically lands branches for a project
9-hosted on Launchpad after the merges have been properly approved. It uses the
10-Launchpad REST API to find approved merge proposals against the current
11-development focus, and automatically merges those branches.
12-
13-
14-Installation
15-============
16-
17-Download the most recent Tarmac tarball or checkout the branch with ``bzr
18-branch lp:tarmac``. Within the tarmac directory, one can run ``tarmac-lander``
19-straight from there, or run ``python setup.py install`` to install it to the
20-system.
21-
22-
23-Authentication
24-==============
25-
26-When running Tarmac for the first time, it will need to get an OAuth token from
27-Launchpad to allow it to act as a user. One can do this by running the
28-following command:
29-
30- ``tarmac-authenticate``
31-
32- ...and then follow the instructions. The token will be placed in
33-``$HOME/.config/tarmac/credentials``. Tarmac does need to write some data, so
34-it's required that the token have at least write access as the user.
35-
36-
37-Usage
38-=====
39-
40-Run ``tarmac-lander <project>`` to get Tarmac to look for the development
41-focus of a project and any branches approved to merge into the branch. One
42-may test it out without merging by running:
43-
44- ``tarmac-lander <project> --dry-run``
45-
46-Tarmac recognizes branches to land when the merge proposal's status (not the
47-votes) is "Approved" and a valid commit message has been set for the branch.
48-If a branch isn't being picked up by Tarmac to land, then one of these issues
49-is probably the culprit.
50-
51-
52-Web Interface
53-=============
54-
55-Tarmac includes an optional web interface to display the status of Tarmac.
56-The web interface is a wsgi app that can easily be loaded into mod_wsgi in
57-your apache or nginx server, or run standalone.
58+Tarmac is a script for merging bzr branches from launchpad. It has many
59+features. To get started, please see docs/introduction.txt
60
61=== modified file 'docs/introduction.txt'
62--- docs/introduction.txt 2010-09-10 09:12:24 +0000
63+++ docs/introduction.txt 2010-10-26 01:04:00 +0000
64@@ -66,6 +66,41 @@
65 If this directory or tree doesn't exist, Tarmac will go ahead and create it.
66
67
68+Running Tarmac
69+==============
70+
71+Once Tarmac is all configured, simply run ``tarmac merge``. Voila! If there
72+are issues at all, you can run ``tarmac merge --debug`` to get more debug
73+imformation.
74+
75+==============
76+Tarmac on Cron
77+==============
78+
79+Tarmac runs best on a cron, because it's doing stuff you shouldn't even need to
80+worry about. To make Tarmac run on a cron, add this to your crontab::
81+
82+0 1 * * * tarmac merge
83+
84+This will run Tarmac every hour, and merge branches if needed, and just quickly
85+shut down if not needed. Depending on the velocity of your project and what
86+things Tarmac is doing when it merges (are your tests taking FOREVER?), you'll
87+want to tune this to work best for your project.
88+
89+
90+==========================
91+Authenticating with Tarmac
92+==========================
93+
94+If you ever feel the need to manually authenticate Tarmac, you can run::
95+
96+ tarmac authenticate
97+
98+Follow the prompts and you'll be ready to go. Tarmac creates an authorization
99+token in $HOME/.config/tarmac/credentials. If this file is ever corrupted, you
100+can just remove it and run the authentication again.
101+
102+
103 ================
104 Built-in Plugins
105 ================
106@@ -193,3 +228,11 @@
107 system. In order to install extra plugins, place them
108 ``$HOME/.config/tarmac/plugins``. They will then be available for import in
109 python at tarmac.plugins.
110+
111+
112+Getting Help
113+============
114+
115+If you ever get stuck with Tarmac, you can easily find help by running::
116+
117+ tarmac help
118
119=== modified file 'tarmac/bin/commands.py'
120--- tarmac/bin/commands.py 2010-10-12 19:58:22 +0000
121+++ tarmac/bin/commands.py 2010-10-26 01:04:00 +0000
122@@ -33,6 +33,21 @@
123 set_up_logging(self.config)
124 self.logger = logging.getLogger('tarmac')
125
126+ def _usage(self):
127+ """Custom _usage for referencing "tarmac" instead of "bzr."""
128+ s = 'tarmac ' + self.name() + ' '
129+ for aname in self.takes_args:
130+ aname = aname.upper()
131+ if aname[-1] in ['$', '+']:
132+ aname = aname[:-1] + '...'
133+ elif aname[-1] == '?':
134+ aname = '[' + aname[:-1] + ']'
135+ elif aname[-1] == '*':
136+ aname = '[' + aname[:-1] + '...]'
137+ s += aname + ' '
138+ s = s[:-1]
139+ return s
140+
141 def run(self):
142 '''Actually run the command.'''
143
144
145=== modified file 'tarmac/bin/registry.py'
146--- tarmac/bin/registry.py 2010-08-13 18:56:40 +0000
147+++ tarmac/bin/registry.py 2010-10-26 01:04:00 +0000
148@@ -19,6 +19,11 @@
149
150 def _get_command(self, command, name):
151 '''Return the command.'''
152+ if name.startswith('-'):
153+ if name == '--help':
154+ name = 'help'
155+ else:
156+ return
157 _command = None
158 try:
159 _command = self._registry[name]

Subscribers

People subscribed via source and target branches