~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzr_man.py

  • Committer: Jelmer Vernooij
  • Date: 2005-11-04 17:26:05 UTC
  • mfrom: (1185.16.146)
  • mto: (1185.33.1)
  • mto: This revision was merged to the branch mainline in revision 1509.
  • Revision ID: jelmer@samba.org-20051104172605-9288f261492667fd
MergeĀ fromĀ Martin

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import os, sys
23
23
 
24
 
try:
25
 
    version_info = sys.version_info
26
 
except AttributeError:
27
 
    version_info = 1, 5 # 1.5 or older
28
 
 
29
 
 
30
 
REINVOKE = "__BZR_REINVOKE"    
31
 
NEED_VERS = (2, 3)
32
 
 
33
 
if version_info < NEED_VERS:
34
 
    if not os.environ.has_key(REINVOKE):
35
 
        # mutating os.environ doesn't work in old Pythons
36
 
        os.putenv(REINVOKE, "1")
37
 
        for python in 'python2.4', 'python2.3':
38
 
            try:
39
 
                os.execvp(python, [python] + sys.argv)
40
 
            except OSError:
41
 
                pass
42
 
    print >>sys.stderr, "bzr-man.py: error: cannot find a suitable python interpreter"
43
 
    print >>sys.stderr, "  (need %d.%d or later)" % NEED_VERS
44
 
    sys.exit(1)
45
 
if hasattr(os, "unsetenv"):
46
 
    os.unsetenv(REINVOKE)
47
 
 
48
24
import bzrlib, bzrlib.help
49
25
 
50
26
#>>> code taken from bzr (C) Canonical
126
102
        bzrcmd = self.params["bzrcmd"]
127
103
        outfile.write('.SH "COMMAND OVERVIEW"\n')
128
104
        for (command,usage,descr) in self.command_usage:
129
 
            outfile.write('.TP\n.B "%s %s"\n%s\n\n' % (bzrcmd, usage, descr))
 
105
            outfile.write('.TP\n.B "%s %s"\n%s\n' % (bzrcmd, usage, descr))
130
106
 
131
107
 
132
108
class HelpReader:
196
172
Path where
197
173
.B "%(bzrcmd)s"
198
174
is to look for external command.
199
 
 
200
175
.TP
201
176
.I "BZREMAIL"
202
177
E-Mail address of the user. Overrides
204
179
.IR "EMAIL" .
205
180
Example content:
206
181
.I "John Doe <john@example.com>"
207
 
 
208
182
.TP
209
183
.I "EMAIL"
210
184
E-Mail address of the user. Overridden by the content of the file
211
185
.I "~/.bzr.conf/email"
212
186
and of the environment variable
213
187
.IR "BZREMAIL" .
214
 
 
215
188
.SH "FILES"
216
189
.TP
217
190
.I "~/.bzr.conf/"
222
195
.I "EMAIL"
223
196
environment variable. Example content:
224
197
.I "John Doe <john@example.com>"
225
 
 
226
198
.SH "SEE ALSO"
227
199
.UR http://www.bazaar-ng.org/
228
200
.BR http://www.bazaar-ng.org/,