bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
4070.11.16
by Martin Pool
Fix copyrights and remove assert statement from doc_generate |
1 |
# Copyright (C) 2005 Canonical Ltd
|
|
1551.3.11
by Aaron Bentley
Merge from Robert |
2 |
|
3 |
# This program is free software; you can redistribute it and/or modify
|
|
4 |
# it under the terms of the GNU General Public License as published by
|
|
5 |
# the Free Software Foundation; either version 2 of the License, or
|
|
6 |
# (at your option) any later version.
|
|
|
1887.1.1
by Adeodato Simó
Do not separate paragraphs in the copyright statement with blank lines, |
7 |
#
|
|
1551.3.11
by Aaron Bentley
Merge from Robert |
8 |
# This program is distributed in the hope that it will be useful,
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11 |
# GNU General Public License for more details.
|
|
|
1887.1.1
by Adeodato Simó
Do not separate paragraphs in the copyright statement with blank lines, |
12 |
#
|
|
1551.3.11
by Aaron Bentley
Merge from Robert |
13 |
# You should have received a copy of the GNU General Public License
|
14 |
# along with this program; if not, write to the Free Software
|
|
|
4183.7.1
by Sabin Iacob
update FSF mailing address |
15 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
1551.3.11
by Aaron Bentley
Merge from Robert |
16 |
|
|
6639.1.1
by Jelmer Vernooij
Support the SOURCE_DATE_EPOCH environment variable. |
17 |
"bash_completion.py - create bash completion script from built-in brz help"
|
|
6379.6.7
by Jelmer Vernooij
Move importing from future until after doc string, otherwise the doc string will disappear. |
18 |
|
|
6622.1.34
by Jelmer Vernooij
Rename brzlib => breezy. |
19 |
import breezy |
20 |
import breezy.help |
|
21 |
import breezy.commands |
|
|
6639.1.1
by Jelmer Vernooij
Support the SOURCE_DATE_EPOCH environment variable. |
22 |
from breezy.doc_generate import get_autodoc_datetime |
|
1551.3.11
by Aaron Bentley
Merge from Robert |
23 |
|
24 |
||
25 |
def get_filename(options): |
|
|
6639.1.1
by Jelmer Vernooij
Support the SOURCE_DATE_EPOCH environment variable. |
26 |
return "%s.bash_completion" % (options.brz_name) |
|
1551.3.11
by Aaron Bentley
Merge from Robert |
27 |
|
28 |
||
29 |
def infogen(options, outfile): |
|
|
6639.1.1
by Jelmer Vernooij
Support the SOURCE_DATE_EPOCH environment variable. |
30 |
d = get_autodoc_datetime() |
|
1551.3.11
by Aaron Bentley
Merge from Robert |
31 |
params = \ |
|
7143.15.2
by Jelmer Vernooij
Run autopep8. |
32 |
{"brzcmd": options.brz_name, |
33 |
"datestamp": d.strftime("%Y-%m-%d"), |
|
34 |
"timestamp": d.strftime("%Y-%m-%d %H:%M:%S +0000"), |
|
35 |
"version": breezy.__version__, |
|
36 |
}
|
|
|
1551.3.11
by Aaron Bentley
Merge from Robert |
37 |
|
38 |
outfile.write(preamble % params) |
|
39 |
||
40 |
||
41 |
preamble = """\ |
|
|
6639.1.1
by Jelmer Vernooij
Support the SOURCE_DATE_EPOCH environment variable. |
42 |
# bash completion functions for for Breezy (%(brzcmd)s) |
|
1551.3.11
by Aaron Bentley
Merge from Robert |
43 |
#
|
44 |
# Large parts of this file are autogenerated from the internal
|
|
|
6639.1.1
by Jelmer Vernooij
Support the SOURCE_DATE_EPOCH environment variable. |
45 |
# Breezy documentation and data structures.
|
|
1551.3.11
by Aaron Bentley
Merge from Robert |
46 |
#
|
47 |
# Generation time: %(timestamp)s |
|
48 |
"""
|