Show More
@@ -1,1109 +1,1115 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | # $Id: manpage.py 6110 2009-08-31 14:40:33Z grubert $ |
|
2 | # $Id: manpage.py 6110 2009-08-31 14:40:33Z grubert $ | |
3 | # Author: Engelbert Gruber <grubert@users.sourceforge.net> |
|
3 | # Author: Engelbert Gruber <grubert@users.sourceforge.net> | |
4 | # Copyright: This module is put into the public domain. |
|
4 | # Copyright: This module is put into the public domain. | |
5 |
|
5 | |||
6 | """ |
|
6 | """ | |
7 | Simple man page writer for reStructuredText. |
|
7 | Simple man page writer for reStructuredText. | |
8 |
|
8 | |||
9 | Man pages (short for "manual pages") contain system documentation on unix-like |
|
9 | Man pages (short for "manual pages") contain system documentation on unix-like | |
10 | systems. The pages are grouped in numbered sections: |
|
10 | systems. The pages are grouped in numbered sections: | |
11 |
|
11 | |||
12 | 1 executable programs and shell commands |
|
12 | 1 executable programs and shell commands | |
13 | 2 system calls |
|
13 | 2 system calls | |
14 | 3 library functions |
|
14 | 3 library functions | |
15 | 4 special files |
|
15 | 4 special files | |
16 | 5 file formats |
|
16 | 5 file formats | |
17 | 6 games |
|
17 | 6 games | |
18 | 7 miscellaneous |
|
18 | 7 miscellaneous | |
19 | 8 system administration |
|
19 | 8 system administration | |
20 |
|
20 | |||
21 | Man pages are written in *troff*, a text file formatting system. |
|
21 | Man pages are written in *troff*, a text file formatting system. | |
22 |
|
22 | |||
23 | See http://www.tldp.org/HOWTO/Man-Page for a start. |
|
23 | See http://www.tldp.org/HOWTO/Man-Page for a start. | |
24 |
|
24 | |||
25 | Man pages have no subsections only parts. |
|
25 | Man pages have no subsections only parts. | |
26 | Standard parts |
|
26 | Standard parts | |
27 |
|
27 | |||
28 | NAME , |
|
28 | NAME , | |
29 | SYNOPSIS , |
|
29 | SYNOPSIS , | |
30 | DESCRIPTION , |
|
30 | DESCRIPTION , | |
31 | OPTIONS , |
|
31 | OPTIONS , | |
32 | FILES , |
|
32 | FILES , | |
33 | SEE ALSO , |
|
33 | SEE ALSO , | |
34 | BUGS , |
|
34 | BUGS , | |
35 |
|
35 | |||
36 | and |
|
36 | and | |
37 |
|
37 | |||
38 | AUTHOR . |
|
38 | AUTHOR . | |
39 |
|
39 | |||
40 | A unix-like system keeps an index of the DESCRIPTIONs, which is accesable |
|
40 | A unix-like system keeps an index of the DESCRIPTIONs, which is accesable | |
41 | by the command whatis or apropos. |
|
41 | by the command whatis or apropos. | |
42 |
|
42 | |||
43 | """ |
|
43 | """ | |
|
44 | from __future__ import absolute_import | |||
44 |
|
45 | |||
45 | __docformat__ = 'reStructuredText' |
|
46 | __docformat__ = 'reStructuredText' | |
46 |
|
47 | |||
|
48 | import inspect | |||
47 | import re |
|
49 | import re | |
48 |
|
50 | |||
49 |
from docutils import |
|
51 | from docutils import ( | |
|
52 | languages, | |||
|
53 | nodes, | |||
|
54 | writers, | |||
|
55 | ) | |||
50 | try: |
|
56 | try: | |
51 | import roman |
|
57 | import roman | |
52 | except ImportError: |
|
58 | except ImportError: | |
53 | from docutils.utils import roman |
|
59 | from docutils.utils import roman | |
54 | import inspect |
|
60 | import inspect | |
55 |
|
61 | |||
56 | FIELD_LIST_INDENT = 7 |
|
62 | FIELD_LIST_INDENT = 7 | |
57 | DEFINITION_LIST_INDENT = 7 |
|
63 | DEFINITION_LIST_INDENT = 7 | |
58 | OPTION_LIST_INDENT = 7 |
|
64 | OPTION_LIST_INDENT = 7 | |
59 | BLOCKQOUTE_INDENT = 3.5 |
|
65 | BLOCKQOUTE_INDENT = 3.5 | |
60 |
|
66 | |||
61 | # Define two macros so man/roff can calculate the |
|
67 | # Define two macros so man/roff can calculate the | |
62 | # indent/unindent margins by itself |
|
68 | # indent/unindent margins by itself | |
63 | MACRO_DEF = (r""". |
|
69 | MACRO_DEF = (r""". | |
64 | .nr rst2man-indent-level 0 |
|
70 | .nr rst2man-indent-level 0 | |
65 | . |
|
71 | . | |
66 | .de1 rstReportMargin |
|
72 | .de1 rstReportMargin | |
67 | \\$1 \\n[an-margin] |
|
73 | \\$1 \\n[an-margin] | |
68 | level \\n[rst2man-indent-level] |
|
74 | level \\n[rst2man-indent-level] | |
69 | level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
|
75 | level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] | |
70 | - |
|
76 | - | |
71 | \\n[rst2man-indent0] |
|
77 | \\n[rst2man-indent0] | |
72 | \\n[rst2man-indent1] |
|
78 | \\n[rst2man-indent1] | |
73 | \\n[rst2man-indent2] |
|
79 | \\n[rst2man-indent2] | |
74 | .. |
|
80 | .. | |
75 | .de1 INDENT |
|
81 | .de1 INDENT | |
76 | .\" .rstReportMargin pre: |
|
82 | .\" .rstReportMargin pre: | |
77 | . RS \\$1 |
|
83 | . RS \\$1 | |
78 | . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
|
84 | . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] | |
79 | . nr rst2man-indent-level +1 |
|
85 | . nr rst2man-indent-level +1 | |
80 | .\" .rstReportMargin post: |
|
86 | .\" .rstReportMargin post: | |
81 | .. |
|
87 | .. | |
82 | .de UNINDENT |
|
88 | .de UNINDENT | |
83 | . RE |
|
89 | . RE | |
84 | .\" indent \\n[an-margin] |
|
90 | .\" indent \\n[an-margin] | |
85 | .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
|
91 | .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] | |
86 | .nr rst2man-indent-level -1 |
|
92 | .nr rst2man-indent-level -1 | |
87 | .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
|
93 | .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] | |
88 | .in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
|
94 | .in \\n[rst2man-indent\\n[rst2man-indent-level]]u | |
89 | .. |
|
95 | .. | |
90 | """) |
|
96 | """) | |
91 |
|
97 | |||
92 | class Writer(writers.Writer): |
|
98 | class Writer(writers.Writer): | |
93 |
|
99 | |||
94 | supported = ('manpage') |
|
100 | supported = ('manpage') | |
95 | """Formats this writer supports.""" |
|
101 | """Formats this writer supports.""" | |
96 |
|
102 | |||
97 | output = None |
|
103 | output = None | |
98 | """Final translated form of `document`.""" |
|
104 | """Final translated form of `document`.""" | |
99 |
|
105 | |||
100 | def __init__(self): |
|
106 | def __init__(self): | |
101 | writers.Writer.__init__(self) |
|
107 | writers.Writer.__init__(self) | |
102 | self.translator_class = Translator |
|
108 | self.translator_class = Translator | |
103 |
|
109 | |||
104 | def translate(self): |
|
110 | def translate(self): | |
105 | visitor = self.translator_class(self.document) |
|
111 | visitor = self.translator_class(self.document) | |
106 | self.document.walkabout(visitor) |
|
112 | self.document.walkabout(visitor) | |
107 | self.output = visitor.astext() |
|
113 | self.output = visitor.astext() | |
108 |
|
114 | |||
109 |
|
115 | |||
110 | class Table(object): |
|
116 | class Table(object): | |
111 | def __init__(self): |
|
117 | def __init__(self): | |
112 | self._rows = [] |
|
118 | self._rows = [] | |
113 | self._options = ['center'] |
|
119 | self._options = ['center'] | |
114 | self._tab_char = '\t' |
|
120 | self._tab_char = '\t' | |
115 | self._coldefs = [] |
|
121 | self._coldefs = [] | |
116 | def new_row(self): |
|
122 | def new_row(self): | |
117 | self._rows.append([]) |
|
123 | self._rows.append([]) | |
118 | def append_separator(self, separator): |
|
124 | def append_separator(self, separator): | |
119 | """Append the separator for table head.""" |
|
125 | """Append the separator for table head.""" | |
120 | self._rows.append([separator]) |
|
126 | self._rows.append([separator]) | |
121 | def append_cell(self, cell_lines): |
|
127 | def append_cell(self, cell_lines): | |
122 | """cell_lines is an array of lines""" |
|
128 | """cell_lines is an array of lines""" | |
123 | start = 0 |
|
129 | start = 0 | |
124 | if len(cell_lines) > 0 and cell_lines[0] == '.sp\n': |
|
130 | if len(cell_lines) > 0 and cell_lines[0] == '.sp\n': | |
125 | start = 1 |
|
131 | start = 1 | |
126 | self._rows[-1].append(cell_lines[start:]) |
|
132 | self._rows[-1].append(cell_lines[start:]) | |
127 | if len(self._coldefs) < len(self._rows[-1]): |
|
133 | if len(self._coldefs) < len(self._rows[-1]): | |
128 | self._coldefs.append('l') |
|
134 | self._coldefs.append('l') | |
129 | def _minimize_cell(self, cell_lines): |
|
135 | def _minimize_cell(self, cell_lines): | |
130 | """Remove leading and trailing blank and ``.sp`` lines""" |
|
136 | """Remove leading and trailing blank and ``.sp`` lines""" | |
131 | while (cell_lines and cell_lines[0] in ('\n', '.sp\n')): |
|
137 | while (cell_lines and cell_lines[0] in ('\n', '.sp\n')): | |
132 | del cell_lines[0] |
|
138 | del cell_lines[0] | |
133 | while (cell_lines and cell_lines[-1] in ('\n', '.sp\n')): |
|
139 | while (cell_lines and cell_lines[-1] in ('\n', '.sp\n')): | |
134 | del cell_lines[-1] |
|
140 | del cell_lines[-1] | |
135 | def as_list(self): |
|
141 | def as_list(self): | |
136 | text = ['.TS\n'] |
|
142 | text = ['.TS\n'] | |
137 | text.append(' '.join(self._options) + ';\n') |
|
143 | text.append(' '.join(self._options) + ';\n') | |
138 | text.append('|%s|.\n' % ('|'.join(self._coldefs))) |
|
144 | text.append('|%s|.\n' % ('|'.join(self._coldefs))) | |
139 | for row in self._rows: |
|
145 | for row in self._rows: | |
140 | # row = array of cells. cell = array of lines. |
|
146 | # row = array of cells. cell = array of lines. | |
141 | text.append('_\n') # line above |
|
147 | text.append('_\n') # line above | |
142 | text.append('T{\n') |
|
148 | text.append('T{\n') | |
143 | for i in range(len(row)): |
|
149 | for i in range(len(row)): | |
144 | cell = row[i] |
|
150 | cell = row[i] | |
145 | self._minimize_cell(cell) |
|
151 | self._minimize_cell(cell) | |
146 | text.extend(cell) |
|
152 | text.extend(cell) | |
147 | if not text[-1].endswith('\n'): |
|
153 | if not text[-1].endswith('\n'): | |
148 | text[-1] += '\n' |
|
154 | text[-1] += '\n' | |
149 | if i < len(row) - 1: |
|
155 | if i < len(row) - 1: | |
150 | text.append('T}'+self._tab_char+'T{\n') |
|
156 | text.append('T}'+self._tab_char+'T{\n') | |
151 | else: |
|
157 | else: | |
152 | text.append('T}\n') |
|
158 | text.append('T}\n') | |
153 | text.append('_\n') |
|
159 | text.append('_\n') | |
154 | text.append('.TE\n') |
|
160 | text.append('.TE\n') | |
155 | return text |
|
161 | return text | |
156 |
|
162 | |||
157 | class Translator(nodes.NodeVisitor): |
|
163 | class Translator(nodes.NodeVisitor): | |
158 | """""" |
|
164 | """""" | |
159 |
|
165 | |||
160 | words_and_spaces = re.compile(r'\S+| +|\n') |
|
166 | words_and_spaces = re.compile(r'\S+| +|\n') | |
161 | document_start = """Man page generated from reStructuredText.""" |
|
167 | document_start = """Man page generated from reStructuredText.""" | |
162 |
|
168 | |||
163 | def __init__(self, document): |
|
169 | def __init__(self, document): | |
164 | nodes.NodeVisitor.__init__(self, document) |
|
170 | nodes.NodeVisitor.__init__(self, document) | |
165 | self.settings = settings = document.settings |
|
171 | self.settings = settings = document.settings | |
166 | lcode = settings.language_code |
|
172 | lcode = settings.language_code | |
167 | arglen = len(inspect.getargspec(languages.get_language)[0]) |
|
173 | arglen = len(inspect.getargspec(languages.get_language)[0]) | |
168 | if arglen == 2: |
|
174 | if arglen == 2: | |
169 | self.language = languages.get_language(lcode, |
|
175 | self.language = languages.get_language(lcode, | |
170 | self.document.reporter) |
|
176 | self.document.reporter) | |
171 | else: |
|
177 | else: | |
172 | self.language = languages.get_language(lcode) |
|
178 | self.language = languages.get_language(lcode) | |
173 | self.head = [] |
|
179 | self.head = [] | |
174 | self.body = [] |
|
180 | self.body = [] | |
175 | self.foot = [] |
|
181 | self.foot = [] | |
176 | self.section_level = 0 |
|
182 | self.section_level = 0 | |
177 | self.context = [] |
|
183 | self.context = [] | |
178 | self.topic_class = '' |
|
184 | self.topic_class = '' | |
179 | self.colspecs = [] |
|
185 | self.colspecs = [] | |
180 | self.compact_p = 1 |
|
186 | self.compact_p = 1 | |
181 | self.compact_simple = None |
|
187 | self.compact_simple = None | |
182 | # the list style "*" bullet or "#" numbered |
|
188 | # the list style "*" bullet or "#" numbered | |
183 | self._list_char = [] |
|
189 | self._list_char = [] | |
184 | # writing the header .TH and .SH NAME is postboned after |
|
190 | # writing the header .TH and .SH NAME is postboned after | |
185 | # docinfo. |
|
191 | # docinfo. | |
186 | self._docinfo = { |
|
192 | self._docinfo = { | |
187 | "title" : "", "title_upper": "", |
|
193 | "title" : "", "title_upper": "", | |
188 | "subtitle" : "", |
|
194 | "subtitle" : "", | |
189 | "manual_section" : "", "manual_group" : "", |
|
195 | "manual_section" : "", "manual_group" : "", | |
190 | "author" : [], |
|
196 | "author" : [], | |
191 | "date" : "", |
|
197 | "date" : "", | |
192 | "copyright" : "", |
|
198 | "copyright" : "", | |
193 | "version" : "", |
|
199 | "version" : "", | |
194 | } |
|
200 | } | |
195 | self._docinfo_keys = [] # a list to keep the sequence as in source. |
|
201 | self._docinfo_keys = [] # a list to keep the sequence as in source. | |
196 | self._docinfo_names = {} # to get name from text not normalized. |
|
202 | self._docinfo_names = {} # to get name from text not normalized. | |
197 | self._in_docinfo = None |
|
203 | self._in_docinfo = None | |
198 | self._active_table = None |
|
204 | self._active_table = None | |
199 | self._in_literal = False |
|
205 | self._in_literal = False | |
200 | self.header_written = 0 |
|
206 | self.header_written = 0 | |
201 | self._line_block = 0 |
|
207 | self._line_block = 0 | |
202 | self.authors = [] |
|
208 | self.authors = [] | |
203 | self.section_level = 0 |
|
209 | self.section_level = 0 | |
204 | self._indent = [0] |
|
210 | self._indent = [0] | |
205 | # central definition of simple processing rules |
|
211 | # central definition of simple processing rules | |
206 | # what to output on : visit, depart |
|
212 | # what to output on : visit, depart | |
207 | # Do not use paragraph requests ``.PP`` because these set indentation. |
|
213 | # Do not use paragraph requests ``.PP`` because these set indentation. | |
208 | # use ``.sp``. Remove superfluous ``.sp`` in ``astext``. |
|
214 | # use ``.sp``. Remove superfluous ``.sp`` in ``astext``. | |
209 | # |
|
215 | # | |
210 | # Fonts are put on a stack, the top one is used. |
|
216 | # Fonts are put on a stack, the top one is used. | |
211 | # ``.ft P`` or ``\\fP`` pop from stack. |
|
217 | # ``.ft P`` or ``\\fP`` pop from stack. | |
212 | # ``B`` bold, ``I`` italic, ``R`` roman should be available. |
|
218 | # ``B`` bold, ``I`` italic, ``R`` roman should be available. | |
213 | # Hopefully ``C`` courier too. |
|
219 | # Hopefully ``C`` courier too. | |
214 | self.defs = { |
|
220 | self.defs = { | |
215 | 'indent' : ('.INDENT %.1f\n', '.UNINDENT\n'), |
|
221 | 'indent' : ('.INDENT %.1f\n', '.UNINDENT\n'), | |
216 | 'definition_list_item' : ('.TP', ''), |
|
222 | 'definition_list_item' : ('.TP', ''), | |
217 | 'field_name' : ('.TP\n.B ', '\n'), |
|
223 | 'field_name' : ('.TP\n.B ', '\n'), | |
218 | 'literal' : ('\\fB', '\\fP'), |
|
224 | 'literal' : ('\\fB', '\\fP'), | |
219 | 'literal_block' : ('.sp\n.nf\n.ft C\n', '\n.ft P\n.fi\n'), |
|
225 | 'literal_block' : ('.sp\n.nf\n.ft C\n', '\n.ft P\n.fi\n'), | |
220 |
|
226 | |||
221 | 'option_list_item' : ('.TP\n', ''), |
|
227 | 'option_list_item' : ('.TP\n', ''), | |
222 |
|
228 | |||
223 | 'reference' : (r'\%', r'\:'), |
|
229 | 'reference' : (r'\%', r'\:'), | |
224 | 'emphasis': ('\\fI', '\\fP'), |
|
230 | 'emphasis': ('\\fI', '\\fP'), | |
225 | 'strong' : ('\\fB', '\\fP'), |
|
231 | 'strong' : ('\\fB', '\\fP'), | |
226 | 'term' : ('\n.B ', '\n'), |
|
232 | 'term' : ('\n.B ', '\n'), | |
227 | 'title_reference' : ('\\fI', '\\fP'), |
|
233 | 'title_reference' : ('\\fI', '\\fP'), | |
228 |
|
234 | |||
229 | 'topic-title' : ('.SS ',), |
|
235 | 'topic-title' : ('.SS ',), | |
230 | 'sidebar-title' : ('.SS ',), |
|
236 | 'sidebar-title' : ('.SS ',), | |
231 |
|
237 | |||
232 | 'problematic' : ('\n.nf\n', '\n.fi\n'), |
|
238 | 'problematic' : ('\n.nf\n', '\n.fi\n'), | |
233 | } |
|
239 | } | |
234 | # NOTE don't specify the newline before a dot-command, but ensure |
|
240 | # NOTE don't specify the newline before a dot-command, but ensure | |
235 | # it is there. |
|
241 | # it is there. | |
236 |
|
242 | |||
237 | def comment_begin(self, text): |
|
243 | def comment_begin(self, text): | |
238 | """Return commented version of the passed text WITHOUT end of |
|
244 | """Return commented version of the passed text WITHOUT end of | |
239 | line/comment.""" |
|
245 | line/comment.""" | |
240 | prefix = '.\\" ' |
|
246 | prefix = '.\\" ' | |
241 | out_text = ''.join( |
|
247 | out_text = ''.join( | |
242 | [(prefix + in_line + '\n') |
|
248 | [(prefix + in_line + '\n') | |
243 | for in_line in text.split('\n')]) |
|
249 | for in_line in text.split('\n')]) | |
244 | return out_text |
|
250 | return out_text | |
245 |
|
251 | |||
246 | def comment(self, text): |
|
252 | def comment(self, text): | |
247 | """Return commented version of the passed text.""" |
|
253 | """Return commented version of the passed text.""" | |
248 | return self.comment_begin(text)+'.\n' |
|
254 | return self.comment_begin(text)+'.\n' | |
249 |
|
255 | |||
250 | def ensure_eol(self): |
|
256 | def ensure_eol(self): | |
251 | """Ensure the last line in body is terminated by new line.""" |
|
257 | """Ensure the last line in body is terminated by new line.""" | |
252 | if self.body[-1][-1] != '\n': |
|
258 | if self.body[-1][-1] != '\n': | |
253 | self.body.append('\n') |
|
259 | self.body.append('\n') | |
254 |
|
260 | |||
255 | def astext(self): |
|
261 | def astext(self): | |
256 | """Return the final formatted document as a string.""" |
|
262 | """Return the final formatted document as a string.""" | |
257 | if not self.header_written: |
|
263 | if not self.header_written: | |
258 | # ensure we get a ".TH" as viewers require it. |
|
264 | # ensure we get a ".TH" as viewers require it. | |
259 | self.head.append(self.header()) |
|
265 | self.head.append(self.header()) | |
260 | # filter body |
|
266 | # filter body | |
261 | for i in xrange(len(self.body) - 1, 0, -1): |
|
267 | for i in xrange(len(self.body) - 1, 0, -1): | |
262 | # remove superfluous vertical gaps. |
|
268 | # remove superfluous vertical gaps. | |
263 | if self.body[i] == '.sp\n': |
|
269 | if self.body[i] == '.sp\n': | |
264 | if self.body[i - 1][:4] in ('.BI ','.IP '): |
|
270 | if self.body[i - 1][:4] in ('.BI ','.IP '): | |
265 | self.body[i] = '.\n' |
|
271 | self.body[i] = '.\n' | |
266 | elif (self.body[i - 1][:3] == '.B ' and |
|
272 | elif (self.body[i - 1][:3] == '.B ' and | |
267 | self.body[i - 2][:4] == '.TP\n'): |
|
273 | self.body[i - 2][:4] == '.TP\n'): | |
268 | self.body[i] = '.\n' |
|
274 | self.body[i] = '.\n' | |
269 | elif (self.body[i - 1] == '\n' and |
|
275 | elif (self.body[i - 1] == '\n' and | |
270 | self.body[i - 2][0] != '.' and |
|
276 | self.body[i - 2][0] != '.' and | |
271 | (self.body[i - 3][:7] == '.TP\n.B ' |
|
277 | (self.body[i - 3][:7] == '.TP\n.B ' | |
272 | or self.body[i - 3][:4] == '\n.B ') |
|
278 | or self.body[i - 3][:4] == '\n.B ') | |
273 | ): |
|
279 | ): | |
274 | self.body[i] = '.\n' |
|
280 | self.body[i] = '.\n' | |
275 | return ''.join(self.head + self.body + self.foot) |
|
281 | return ''.join(self.head + self.body + self.foot) | |
276 |
|
282 | |||
277 | def deunicode(self, text): |
|
283 | def deunicode(self, text): | |
278 | text = text.replace(u'\xa0', '\\ ') |
|
284 | text = text.replace(u'\xa0', '\\ ') | |
279 | text = text.replace(u'\u2020', '\\(dg') |
|
285 | text = text.replace(u'\u2020', '\\(dg') | |
280 | return text |
|
286 | return text | |
281 |
|
287 | |||
282 | def visit_Text(self, node): |
|
288 | def visit_Text(self, node): | |
283 | text = node.astext() |
|
289 | text = node.astext() | |
284 | text = text.replace('\\','\\e') |
|
290 | text = text.replace('\\','\\e') | |
285 | replace_pairs = [ |
|
291 | replace_pairs = [ | |
286 | (u'-', ur'\-'), |
|
292 | (u'-', ur'\-'), | |
287 | (u'\'', ur'\(aq'), |
|
293 | (u'\'', ur'\(aq'), | |
288 | (u'Β΄', ur'\''), |
|
294 | (u'Β΄', ur'\''), | |
289 | (u'`', ur'\(ga'), |
|
295 | (u'`', ur'\(ga'), | |
290 | ] |
|
296 | ] | |
291 | for (in_char, out_markup) in replace_pairs: |
|
297 | for (in_char, out_markup) in replace_pairs: | |
292 | text = text.replace(in_char, out_markup) |
|
298 | text = text.replace(in_char, out_markup) | |
293 | # unicode |
|
299 | # unicode | |
294 | text = self.deunicode(text) |
|
300 | text = self.deunicode(text) | |
295 | if self._in_literal: |
|
301 | if self._in_literal: | |
296 | # prevent interpretation of "." at line start |
|
302 | # prevent interpretation of "." at line start | |
297 | if text[0] == '.': |
|
303 | if text[0] == '.': | |
298 | text = '\\&' + text |
|
304 | text = '\\&' + text | |
299 | text = text.replace('\n.', '\n\\&.') |
|
305 | text = text.replace('\n.', '\n\\&.') | |
300 | self.body.append(text) |
|
306 | self.body.append(text) | |
301 |
|
307 | |||
302 | def depart_Text(self, node): |
|
308 | def depart_Text(self, node): | |
303 | pass |
|
309 | pass | |
304 |
|
310 | |||
305 | def list_start(self, node): |
|
311 | def list_start(self, node): | |
306 | class enum_char(object): |
|
312 | class enum_char(object): | |
307 | enum_style = { |
|
313 | enum_style = { | |
308 | 'bullet' : '\\(bu', |
|
314 | 'bullet' : '\\(bu', | |
309 | 'emdash' : '\\(em', |
|
315 | 'emdash' : '\\(em', | |
310 | } |
|
316 | } | |
311 |
|
317 | |||
312 | def __init__(self, style): |
|
318 | def __init__(self, style): | |
313 | self._style = style |
|
319 | self._style = style | |
314 | if 'start' in node: |
|
320 | if 'start' in node: | |
315 | self._cnt = node['start'] - 1 |
|
321 | self._cnt = node['start'] - 1 | |
316 | else: |
|
322 | else: | |
317 | self._cnt = 0 |
|
323 | self._cnt = 0 | |
318 | self._indent = 2 |
|
324 | self._indent = 2 | |
319 | if style == 'arabic': |
|
325 | if style == 'arabic': | |
320 | # indentation depends on number of children |
|
326 | # indentation depends on number of children | |
321 | # and start value. |
|
327 | # and start value. | |
322 | self._indent = len(str(len(node.children))) |
|
328 | self._indent = len(str(len(node.children))) | |
323 | self._indent += len(str(self._cnt)) + 1 |
|
329 | self._indent += len(str(self._cnt)) + 1 | |
324 | elif style == 'loweralpha': |
|
330 | elif style == 'loweralpha': | |
325 | self._cnt += ord('a') - 1 |
|
331 | self._cnt += ord('a') - 1 | |
326 | self._indent = 3 |
|
332 | self._indent = 3 | |
327 | elif style == 'upperalpha': |
|
333 | elif style == 'upperalpha': | |
328 | self._cnt += ord('A') - 1 |
|
334 | self._cnt += ord('A') - 1 | |
329 | self._indent = 3 |
|
335 | self._indent = 3 | |
330 | elif style.endswith('roman'): |
|
336 | elif style.endswith('roman'): | |
331 | self._indent = 5 |
|
337 | self._indent = 5 | |
332 |
|
338 | |||
333 | def next(self): |
|
339 | def next(self): | |
334 | if self._style == 'bullet': |
|
340 | if self._style == 'bullet': | |
335 | return self.enum_style[self._style] |
|
341 | return self.enum_style[self._style] | |
336 | elif self._style == 'emdash': |
|
342 | elif self._style == 'emdash': | |
337 | return self.enum_style[self._style] |
|
343 | return self.enum_style[self._style] | |
338 | self._cnt += 1 |
|
344 | self._cnt += 1 | |
339 | # TODO add prefix postfix |
|
345 | # TODO add prefix postfix | |
340 | if self._style == 'arabic': |
|
346 | if self._style == 'arabic': | |
341 | return "%d." % self._cnt |
|
347 | return "%d." % self._cnt | |
342 | elif self._style in ('loweralpha', 'upperalpha'): |
|
348 | elif self._style in ('loweralpha', 'upperalpha'): | |
343 | return "%c." % self._cnt |
|
349 | return "%c." % self._cnt | |
344 | elif self._style.endswith('roman'): |
|
350 | elif self._style.endswith('roman'): | |
345 | res = roman.toRoman(self._cnt) + '.' |
|
351 | res = roman.toRoman(self._cnt) + '.' | |
346 | if self._style.startswith('upper'): |
|
352 | if self._style.startswith('upper'): | |
347 | return res.upper() |
|
353 | return res.upper() | |
348 | return res.lower() |
|
354 | return res.lower() | |
349 | else: |
|
355 | else: | |
350 | return "%d." % self._cnt |
|
356 | return "%d." % self._cnt | |
351 | def get_width(self): |
|
357 | def get_width(self): | |
352 | return self._indent |
|
358 | return self._indent | |
353 | def __repr__(self): |
|
359 | def __repr__(self): | |
354 | return 'enum_style-%s' % list(self._style) |
|
360 | return 'enum_style-%s' % list(self._style) | |
355 |
|
361 | |||
356 | if 'enumtype' in node: |
|
362 | if 'enumtype' in node: | |
357 | self._list_char.append(enum_char(node['enumtype'])) |
|
363 | self._list_char.append(enum_char(node['enumtype'])) | |
358 | else: |
|
364 | else: | |
359 | self._list_char.append(enum_char('bullet')) |
|
365 | self._list_char.append(enum_char('bullet')) | |
360 | if len(self._list_char) > 1: |
|
366 | if len(self._list_char) > 1: | |
361 | # indent nested lists |
|
367 | # indent nested lists | |
362 | self.indent(self._list_char[-2].get_width()) |
|
368 | self.indent(self._list_char[-2].get_width()) | |
363 | else: |
|
369 | else: | |
364 | self.indent(self._list_char[-1].get_width()) |
|
370 | self.indent(self._list_char[-1].get_width()) | |
365 |
|
371 | |||
366 | def list_end(self): |
|
372 | def list_end(self): | |
367 | self.dedent() |
|
373 | self.dedent() | |
368 | self._list_char.pop() |
|
374 | self._list_char.pop() | |
369 |
|
375 | |||
370 | def header(self): |
|
376 | def header(self): | |
371 | tmpl = (".TH %(title_upper)s %(manual_section)s" |
|
377 | tmpl = (".TH %(title_upper)s %(manual_section)s" | |
372 | " \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n" |
|
378 | " \"%(date)s\" \"%(version)s\" \"%(manual_group)s\"\n" | |
373 | ".SH NAME\n" |
|
379 | ".SH NAME\n" | |
374 | "%(title)s \- %(subtitle)s\n") |
|
380 | "%(title)s \- %(subtitle)s\n") | |
375 | return tmpl % self._docinfo |
|
381 | return tmpl % self._docinfo | |
376 |
|
382 | |||
377 | def append_header(self): |
|
383 | def append_header(self): | |
378 | """append header with .TH and .SH NAME""" |
|
384 | """append header with .TH and .SH NAME""" | |
379 | # NOTE before everything |
|
385 | # NOTE before everything | |
380 | # .TH title_upper section date source manual |
|
386 | # .TH title_upper section date source manual | |
381 | if self.header_written: |
|
387 | if self.header_written: | |
382 | return |
|
388 | return | |
383 | self.body.append(self.header()) |
|
389 | self.body.append(self.header()) | |
384 | self.body.append(MACRO_DEF) |
|
390 | self.body.append(MACRO_DEF) | |
385 | self.header_written = 1 |
|
391 | self.header_written = 1 | |
386 |
|
392 | |||
387 | def visit_address(self, node): |
|
393 | def visit_address(self, node): | |
388 | self.visit_docinfo_item(node, 'address') |
|
394 | self.visit_docinfo_item(node, 'address') | |
389 |
|
395 | |||
390 | def depart_address(self, node): |
|
396 | def depart_address(self, node): | |
391 | pass |
|
397 | pass | |
392 |
|
398 | |||
393 | def visit_admonition(self, node, name=None): |
|
399 | def visit_admonition(self, node, name=None): | |
394 | if name: |
|
400 | if name: | |
395 | self.body.append('.IP %s\n' % |
|
401 | self.body.append('.IP %s\n' % | |
396 | self.language.labels.get(name, name)) |
|
402 | self.language.labels.get(name, name)) | |
397 |
|
403 | |||
398 | def depart_admonition(self, node): |
|
404 | def depart_admonition(self, node): | |
399 | self.body.append('.RE\n') |
|
405 | self.body.append('.RE\n') | |
400 |
|
406 | |||
401 | def visit_attention(self, node): |
|
407 | def visit_attention(self, node): | |
402 | self.visit_admonition(node, 'attention') |
|
408 | self.visit_admonition(node, 'attention') | |
403 |
|
409 | |||
404 | depart_attention = depart_admonition |
|
410 | depart_attention = depart_admonition | |
405 |
|
411 | |||
406 | def visit_docinfo_item(self, node, name): |
|
412 | def visit_docinfo_item(self, node, name): | |
407 | if name == 'author': |
|
413 | if name == 'author': | |
408 | self._docinfo[name].append(node.astext()) |
|
414 | self._docinfo[name].append(node.astext()) | |
409 | else: |
|
415 | else: | |
410 | self._docinfo[name] = node.astext() |
|
416 | self._docinfo[name] = node.astext() | |
411 | self._docinfo_keys.append(name) |
|
417 | self._docinfo_keys.append(name) | |
412 | raise nodes.SkipNode |
|
418 | raise nodes.SkipNode | |
413 |
|
419 | |||
414 | def depart_docinfo_item(self, node): |
|
420 | def depart_docinfo_item(self, node): | |
415 | pass |
|
421 | pass | |
416 |
|
422 | |||
417 | def visit_author(self, node): |
|
423 | def visit_author(self, node): | |
418 | self.visit_docinfo_item(node, 'author') |
|
424 | self.visit_docinfo_item(node, 'author') | |
419 |
|
425 | |||
420 | depart_author = depart_docinfo_item |
|
426 | depart_author = depart_docinfo_item | |
421 |
|
427 | |||
422 | def visit_authors(self, node): |
|
428 | def visit_authors(self, node): | |
423 | # _author is called anyway. |
|
429 | # _author is called anyway. | |
424 | pass |
|
430 | pass | |
425 |
|
431 | |||
426 | def depart_authors(self, node): |
|
432 | def depart_authors(self, node): | |
427 | pass |
|
433 | pass | |
428 |
|
434 | |||
429 | def visit_block_quote(self, node): |
|
435 | def visit_block_quote(self, node): | |
430 | # BUG/HACK: indent always uses the _last_ indentation, |
|
436 | # BUG/HACK: indent always uses the _last_ indentation, | |
431 | # thus we need two of them. |
|
437 | # thus we need two of them. | |
432 | self.indent(BLOCKQOUTE_INDENT) |
|
438 | self.indent(BLOCKQOUTE_INDENT) | |
433 | self.indent(0) |
|
439 | self.indent(0) | |
434 |
|
440 | |||
435 | def depart_block_quote(self, node): |
|
441 | def depart_block_quote(self, node): | |
436 | self.dedent() |
|
442 | self.dedent() | |
437 | self.dedent() |
|
443 | self.dedent() | |
438 |
|
444 | |||
439 | def visit_bullet_list(self, node): |
|
445 | def visit_bullet_list(self, node): | |
440 | self.list_start(node) |
|
446 | self.list_start(node) | |
441 |
|
447 | |||
442 | def depart_bullet_list(self, node): |
|
448 | def depart_bullet_list(self, node): | |
443 | self.list_end() |
|
449 | self.list_end() | |
444 |
|
450 | |||
445 | def visit_caption(self, node): |
|
451 | def visit_caption(self, node): | |
446 | pass |
|
452 | pass | |
447 |
|
453 | |||
448 | def depart_caption(self, node): |
|
454 | def depart_caption(self, node): | |
449 | pass |
|
455 | pass | |
450 |
|
456 | |||
451 | def visit_caution(self, node): |
|
457 | def visit_caution(self, node): | |
452 | self.visit_admonition(node, 'caution') |
|
458 | self.visit_admonition(node, 'caution') | |
453 |
|
459 | |||
454 | depart_caution = depart_admonition |
|
460 | depart_caution = depart_admonition | |
455 |
|
461 | |||
456 | def visit_citation(self, node): |
|
462 | def visit_citation(self, node): | |
457 | num, text = node.astext().split(None, 1) |
|
463 | num, text = node.astext().split(None, 1) | |
458 | num = num.strip() |
|
464 | num = num.strip() | |
459 | self.body.append('.IP [%s] 5\n' % num) |
|
465 | self.body.append('.IP [%s] 5\n' % num) | |
460 |
|
466 | |||
461 | def depart_citation(self, node): |
|
467 | def depart_citation(self, node): | |
462 | pass |
|
468 | pass | |
463 |
|
469 | |||
464 | def visit_citation_reference(self, node): |
|
470 | def visit_citation_reference(self, node): | |
465 | self.body.append('['+node.astext()+']') |
|
471 | self.body.append('['+node.astext()+']') | |
466 | raise nodes.SkipNode |
|
472 | raise nodes.SkipNode | |
467 |
|
473 | |||
468 | def visit_classifier(self, node): |
|
474 | def visit_classifier(self, node): | |
469 | pass |
|
475 | pass | |
470 |
|
476 | |||
471 | def depart_classifier(self, node): |
|
477 | def depart_classifier(self, node): | |
472 | pass |
|
478 | pass | |
473 |
|
479 | |||
474 | def visit_colspec(self, node): |
|
480 | def visit_colspec(self, node): | |
475 | self.colspecs.append(node) |
|
481 | self.colspecs.append(node) | |
476 |
|
482 | |||
477 | def depart_colspec(self, node): |
|
483 | def depart_colspec(self, node): | |
478 | pass |
|
484 | pass | |
479 |
|
485 | |||
480 | def write_colspecs(self): |
|
486 | def write_colspecs(self): | |
481 | self.body.append("%s.\n" % ('L '*len(self.colspecs))) |
|
487 | self.body.append("%s.\n" % ('L '*len(self.colspecs))) | |
482 |
|
488 | |||
483 | def visit_comment(self, node, |
|
489 | def visit_comment(self, node, | |
484 | sub=re.compile('-(?=-)').sub): |
|
490 | sub=re.compile('-(?=-)').sub): | |
485 | self.body.append(self.comment(node.astext())) |
|
491 | self.body.append(self.comment(node.astext())) | |
486 | raise nodes.SkipNode |
|
492 | raise nodes.SkipNode | |
487 |
|
493 | |||
488 | def visit_contact(self, node): |
|
494 | def visit_contact(self, node): | |
489 | self.visit_docinfo_item(node, 'contact') |
|
495 | self.visit_docinfo_item(node, 'contact') | |
490 |
|
496 | |||
491 | depart_contact = depart_docinfo_item |
|
497 | depart_contact = depart_docinfo_item | |
492 |
|
498 | |||
493 | def visit_container(self, node): |
|
499 | def visit_container(self, node): | |
494 | pass |
|
500 | pass | |
495 |
|
501 | |||
496 | def depart_container(self, node): |
|
502 | def depart_container(self, node): | |
497 | pass |
|
503 | pass | |
498 |
|
504 | |||
499 | def visit_compound(self, node): |
|
505 | def visit_compound(self, node): | |
500 | pass |
|
506 | pass | |
501 |
|
507 | |||
502 | def depart_compound(self, node): |
|
508 | def depart_compound(self, node): | |
503 | pass |
|
509 | pass | |
504 |
|
510 | |||
505 | def visit_copyright(self, node): |
|
511 | def visit_copyright(self, node): | |
506 | self.visit_docinfo_item(node, 'copyright') |
|
512 | self.visit_docinfo_item(node, 'copyright') | |
507 |
|
513 | |||
508 | def visit_danger(self, node): |
|
514 | def visit_danger(self, node): | |
509 | self.visit_admonition(node, 'danger') |
|
515 | self.visit_admonition(node, 'danger') | |
510 |
|
516 | |||
511 | depart_danger = depart_admonition |
|
517 | depart_danger = depart_admonition | |
512 |
|
518 | |||
513 | def visit_date(self, node): |
|
519 | def visit_date(self, node): | |
514 | self.visit_docinfo_item(node, 'date') |
|
520 | self.visit_docinfo_item(node, 'date') | |
515 |
|
521 | |||
516 | def visit_decoration(self, node): |
|
522 | def visit_decoration(self, node): | |
517 | pass |
|
523 | pass | |
518 |
|
524 | |||
519 | def depart_decoration(self, node): |
|
525 | def depart_decoration(self, node): | |
520 | pass |
|
526 | pass | |
521 |
|
527 | |||
522 | def visit_definition(self, node): |
|
528 | def visit_definition(self, node): | |
523 | pass |
|
529 | pass | |
524 |
|
530 | |||
525 | def depart_definition(self, node): |
|
531 | def depart_definition(self, node): | |
526 | pass |
|
532 | pass | |
527 |
|
533 | |||
528 | def visit_definition_list(self, node): |
|
534 | def visit_definition_list(self, node): | |
529 | self.indent(DEFINITION_LIST_INDENT) |
|
535 | self.indent(DEFINITION_LIST_INDENT) | |
530 |
|
536 | |||
531 | def depart_definition_list(self, node): |
|
537 | def depart_definition_list(self, node): | |
532 | self.dedent() |
|
538 | self.dedent() | |
533 |
|
539 | |||
534 | def visit_definition_list_item(self, node): |
|
540 | def visit_definition_list_item(self, node): | |
535 | self.body.append(self.defs['definition_list_item'][0]) |
|
541 | self.body.append(self.defs['definition_list_item'][0]) | |
536 |
|
542 | |||
537 | def depart_definition_list_item(self, node): |
|
543 | def depart_definition_list_item(self, node): | |
538 | self.body.append(self.defs['definition_list_item'][1]) |
|
544 | self.body.append(self.defs['definition_list_item'][1]) | |
539 |
|
545 | |||
540 | def visit_description(self, node): |
|
546 | def visit_description(self, node): | |
541 | pass |
|
547 | pass | |
542 |
|
548 | |||
543 | def depart_description(self, node): |
|
549 | def depart_description(self, node): | |
544 | pass |
|
550 | pass | |
545 |
|
551 | |||
546 | def visit_docinfo(self, node): |
|
552 | def visit_docinfo(self, node): | |
547 | self._in_docinfo = 1 |
|
553 | self._in_docinfo = 1 | |
548 |
|
554 | |||
549 | def depart_docinfo(self, node): |
|
555 | def depart_docinfo(self, node): | |
550 | self._in_docinfo = None |
|
556 | self._in_docinfo = None | |
551 | # NOTE nothing should be written before this |
|
557 | # NOTE nothing should be written before this | |
552 | self.append_header() |
|
558 | self.append_header() | |
553 |
|
559 | |||
554 | def visit_doctest_block(self, node): |
|
560 | def visit_doctest_block(self, node): | |
555 | self.body.append(self.defs['literal_block'][0]) |
|
561 | self.body.append(self.defs['literal_block'][0]) | |
556 | self._in_literal = True |
|
562 | self._in_literal = True | |
557 |
|
563 | |||
558 | def depart_doctest_block(self, node): |
|
564 | def depart_doctest_block(self, node): | |
559 | self._in_literal = False |
|
565 | self._in_literal = False | |
560 | self.body.append(self.defs['literal_block'][1]) |
|
566 | self.body.append(self.defs['literal_block'][1]) | |
561 |
|
567 | |||
562 | def visit_document(self, node): |
|
568 | def visit_document(self, node): | |
563 | # no blank line between comment and header. |
|
569 | # no blank line between comment and header. | |
564 | self.body.append(self.comment(self.document_start).rstrip()+'\n') |
|
570 | self.body.append(self.comment(self.document_start).rstrip()+'\n') | |
565 | # writing header is postboned |
|
571 | # writing header is postboned | |
566 | self.header_written = 0 |
|
572 | self.header_written = 0 | |
567 |
|
573 | |||
568 | def depart_document(self, node): |
|
574 | def depart_document(self, node): | |
569 | if self._docinfo['author']: |
|
575 | if self._docinfo['author']: | |
570 | self.body.append('.SH AUTHOR\n%s\n' |
|
576 | self.body.append('.SH AUTHOR\n%s\n' | |
571 | % ', '.join(self._docinfo['author'])) |
|
577 | % ', '.join(self._docinfo['author'])) | |
572 | skip = ('author', 'copyright', 'date', |
|
578 | skip = ('author', 'copyright', 'date', | |
573 | 'manual_group', 'manual_section', |
|
579 | 'manual_group', 'manual_section', | |
574 | 'subtitle', |
|
580 | 'subtitle', | |
575 | 'title', 'title_upper', 'version') |
|
581 | 'title', 'title_upper', 'version') | |
576 | for name in self._docinfo_keys: |
|
582 | for name in self._docinfo_keys: | |
577 | if name == 'address': |
|
583 | if name == 'address': | |
578 | self.body.append("\n%s:\n%s%s.nf\n%s\n.fi\n%s%s" % ( |
|
584 | self.body.append("\n%s:\n%s%s.nf\n%s\n.fi\n%s%s" % ( | |
579 | self.language.labels.get(name, name), |
|
585 | self.language.labels.get(name, name), | |
580 | self.defs['indent'][0] % 0, |
|
586 | self.defs['indent'][0] % 0, | |
581 | self.defs['indent'][0] % BLOCKQOUTE_INDENT, |
|
587 | self.defs['indent'][0] % BLOCKQOUTE_INDENT, | |
582 | self._docinfo[name], |
|
588 | self._docinfo[name], | |
583 | self.defs['indent'][1], |
|
589 | self.defs['indent'][1], | |
584 | self.defs['indent'][1])) |
|
590 | self.defs['indent'][1])) | |
585 | elif name not in skip: |
|
591 | elif name not in skip: | |
586 | if name in self._docinfo_names: |
|
592 | if name in self._docinfo_names: | |
587 | label = self._docinfo_names[name] |
|
593 | label = self._docinfo_names[name] | |
588 | else: |
|
594 | else: | |
589 | label = self.language.labels.get(name, name) |
|
595 | label = self.language.labels.get(name, name) | |
590 | self.body.append("\n%s: %s\n" % (label, self._docinfo[name])) |
|
596 | self.body.append("\n%s: %s\n" % (label, self._docinfo[name])) | |
591 | if self._docinfo['copyright']: |
|
597 | if self._docinfo['copyright']: | |
592 | self.body.append('.SH COPYRIGHT\n%s\n' |
|
598 | self.body.append('.SH COPYRIGHT\n%s\n' | |
593 | % self._docinfo['copyright']) |
|
599 | % self._docinfo['copyright']) | |
594 | self.body.append(self.comment( |
|
600 | self.body.append(self.comment( | |
595 | 'Generated by docutils manpage writer.\n')) |
|
601 | 'Generated by docutils manpage writer.\n')) | |
596 |
|
602 | |||
597 | def visit_emphasis(self, node): |
|
603 | def visit_emphasis(self, node): | |
598 | self.body.append(self.defs['emphasis'][0]) |
|
604 | self.body.append(self.defs['emphasis'][0]) | |
599 |
|
605 | |||
600 | def depart_emphasis(self, node): |
|
606 | def depart_emphasis(self, node): | |
601 | self.body.append(self.defs['emphasis'][1]) |
|
607 | self.body.append(self.defs['emphasis'][1]) | |
602 |
|
608 | |||
603 | def visit_entry(self, node): |
|
609 | def visit_entry(self, node): | |
604 | # a cell in a table row |
|
610 | # a cell in a table row | |
605 | if 'morerows' in node: |
|
611 | if 'morerows' in node: | |
606 | self.document.reporter.warning('"table row spanning" not supported', |
|
612 | self.document.reporter.warning('"table row spanning" not supported', | |
607 | base_node=node) |
|
613 | base_node=node) | |
608 | if 'morecols' in node: |
|
614 | if 'morecols' in node: | |
609 | self.document.reporter.warning( |
|
615 | self.document.reporter.warning( | |
610 | '"table cell spanning" not supported', base_node=node) |
|
616 | '"table cell spanning" not supported', base_node=node) | |
611 | self.context.append(len(self.body)) |
|
617 | self.context.append(len(self.body)) | |
612 |
|
618 | |||
613 | def depart_entry(self, node): |
|
619 | def depart_entry(self, node): | |
614 | start = self.context.pop() |
|
620 | start = self.context.pop() | |
615 | self._active_table.append_cell(self.body[start:]) |
|
621 | self._active_table.append_cell(self.body[start:]) | |
616 | del self.body[start:] |
|
622 | del self.body[start:] | |
617 |
|
623 | |||
618 | def visit_enumerated_list(self, node): |
|
624 | def visit_enumerated_list(self, node): | |
619 | self.list_start(node) |
|
625 | self.list_start(node) | |
620 |
|
626 | |||
621 | def depart_enumerated_list(self, node): |
|
627 | def depart_enumerated_list(self, node): | |
622 | self.list_end() |
|
628 | self.list_end() | |
623 |
|
629 | |||
624 | def visit_error(self, node): |
|
630 | def visit_error(self, node): | |
625 | self.visit_admonition(node, 'error') |
|
631 | self.visit_admonition(node, 'error') | |
626 |
|
632 | |||
627 | depart_error = depart_admonition |
|
633 | depart_error = depart_admonition | |
628 |
|
634 | |||
629 | def visit_field(self, node): |
|
635 | def visit_field(self, node): | |
630 | pass |
|
636 | pass | |
631 |
|
637 | |||
632 | def depart_field(self, node): |
|
638 | def depart_field(self, node): | |
633 | pass |
|
639 | pass | |
634 |
|
640 | |||
635 | def visit_field_body(self, node): |
|
641 | def visit_field_body(self, node): | |
636 | if self._in_docinfo: |
|
642 | if self._in_docinfo: | |
637 | name_normalized = self._field_name.lower().replace(" ","_") |
|
643 | name_normalized = self._field_name.lower().replace(" ","_") | |
638 | self._docinfo_names[name_normalized] = self._field_name |
|
644 | self._docinfo_names[name_normalized] = self._field_name | |
639 | self.visit_docinfo_item(node, name_normalized) |
|
645 | self.visit_docinfo_item(node, name_normalized) | |
640 | raise nodes.SkipNode |
|
646 | raise nodes.SkipNode | |
641 |
|
647 | |||
642 | def depart_field_body(self, node): |
|
648 | def depart_field_body(self, node): | |
643 | pass |
|
649 | pass | |
644 |
|
650 | |||
645 | def visit_field_list(self, node): |
|
651 | def visit_field_list(self, node): | |
646 | self.indent(FIELD_LIST_INDENT) |
|
652 | self.indent(FIELD_LIST_INDENT) | |
647 |
|
653 | |||
648 | def depart_field_list(self, node): |
|
654 | def depart_field_list(self, node): | |
649 | self.dedent() |
|
655 | self.dedent() | |
650 |
|
656 | |||
651 | def visit_field_name(self, node): |
|
657 | def visit_field_name(self, node): | |
652 | if self._in_docinfo: |
|
658 | if self._in_docinfo: | |
653 | self._field_name = node.astext() |
|
659 | self._field_name = node.astext() | |
654 | raise nodes.SkipNode |
|
660 | raise nodes.SkipNode | |
655 | else: |
|
661 | else: | |
656 | self.body.append(self.defs['field_name'][0]) |
|
662 | self.body.append(self.defs['field_name'][0]) | |
657 |
|
663 | |||
658 | def depart_field_name(self, node): |
|
664 | def depart_field_name(self, node): | |
659 | self.body.append(self.defs['field_name'][1]) |
|
665 | self.body.append(self.defs['field_name'][1]) | |
660 |
|
666 | |||
661 | def visit_figure(self, node): |
|
667 | def visit_figure(self, node): | |
662 | self.indent(2.5) |
|
668 | self.indent(2.5) | |
663 | self.indent(0) |
|
669 | self.indent(0) | |
664 |
|
670 | |||
665 | def depart_figure(self, node): |
|
671 | def depart_figure(self, node): | |
666 | self.dedent() |
|
672 | self.dedent() | |
667 | self.dedent() |
|
673 | self.dedent() | |
668 |
|
674 | |||
669 | def visit_footer(self, node): |
|
675 | def visit_footer(self, node): | |
670 | self.document.reporter.warning('"footer" not supported', |
|
676 | self.document.reporter.warning('"footer" not supported', | |
671 | base_node=node) |
|
677 | base_node=node) | |
672 |
|
678 | |||
673 | def depart_footer(self, node): |
|
679 | def depart_footer(self, node): | |
674 | pass |
|
680 | pass | |
675 |
|
681 | |||
676 | def visit_footnote(self, node): |
|
682 | def visit_footnote(self, node): | |
677 | num, text = node.astext().split(None, 1) |
|
683 | num, text = node.astext().split(None, 1) | |
678 | num = num.strip() |
|
684 | num = num.strip() | |
679 | self.body.append('.IP [%s] 5\n' % self.deunicode(num)) |
|
685 | self.body.append('.IP [%s] 5\n' % self.deunicode(num)) | |
680 |
|
686 | |||
681 | def depart_footnote(self, node): |
|
687 | def depart_footnote(self, node): | |
682 | pass |
|
688 | pass | |
683 |
|
689 | |||
684 | def footnote_backrefs(self, node): |
|
690 | def footnote_backrefs(self, node): | |
685 | self.document.reporter.warning('"footnote_backrefs" not supported', |
|
691 | self.document.reporter.warning('"footnote_backrefs" not supported', | |
686 | base_node=node) |
|
692 | base_node=node) | |
687 |
|
693 | |||
688 | def visit_footnote_reference(self, node): |
|
694 | def visit_footnote_reference(self, node): | |
689 | self.body.append('['+self.deunicode(node.astext())+']') |
|
695 | self.body.append('['+self.deunicode(node.astext())+']') | |
690 | raise nodes.SkipNode |
|
696 | raise nodes.SkipNode | |
691 |
|
697 | |||
692 | def depart_footnote_reference(self, node): |
|
698 | def depart_footnote_reference(self, node): | |
693 | pass |
|
699 | pass | |
694 |
|
700 | |||
695 | def visit_generated(self, node): |
|
701 | def visit_generated(self, node): | |
696 | pass |
|
702 | pass | |
697 |
|
703 | |||
698 | def depart_generated(self, node): |
|
704 | def depart_generated(self, node): | |
699 | pass |
|
705 | pass | |
700 |
|
706 | |||
701 | def visit_header(self, node): |
|
707 | def visit_header(self, node): | |
702 | raise NotImplementedError, node.astext() |
|
708 | raise NotImplementedError, node.astext() | |
703 |
|
709 | |||
704 | def depart_header(self, node): |
|
710 | def depart_header(self, node): | |
705 | pass |
|
711 | pass | |
706 |
|
712 | |||
707 | def visit_hint(self, node): |
|
713 | def visit_hint(self, node): | |
708 | self.visit_admonition(node, 'hint') |
|
714 | self.visit_admonition(node, 'hint') | |
709 |
|
715 | |||
710 | depart_hint = depart_admonition |
|
716 | depart_hint = depart_admonition | |
711 |
|
717 | |||
712 | def visit_subscript(self, node): |
|
718 | def visit_subscript(self, node): | |
713 | self.body.append('\\s-2\\d') |
|
719 | self.body.append('\\s-2\\d') | |
714 |
|
720 | |||
715 | def depart_subscript(self, node): |
|
721 | def depart_subscript(self, node): | |
716 | self.body.append('\\u\\s0') |
|
722 | self.body.append('\\u\\s0') | |
717 |
|
723 | |||
718 | def visit_superscript(self, node): |
|
724 | def visit_superscript(self, node): | |
719 | self.body.append('\\s-2\\u') |
|
725 | self.body.append('\\s-2\\u') | |
720 |
|
726 | |||
721 | def depart_superscript(self, node): |
|
727 | def depart_superscript(self, node): | |
722 | self.body.append('\\d\\s0') |
|
728 | self.body.append('\\d\\s0') | |
723 |
|
729 | |||
724 | def visit_attribution(self, node): |
|
730 | def visit_attribution(self, node): | |
725 | self.body.append('\\(em ') |
|
731 | self.body.append('\\(em ') | |
726 |
|
732 | |||
727 | def depart_attribution(self, node): |
|
733 | def depart_attribution(self, node): | |
728 | self.body.append('\n') |
|
734 | self.body.append('\n') | |
729 |
|
735 | |||
730 | def visit_image(self, node): |
|
736 | def visit_image(self, node): | |
731 | self.document.reporter.warning('"image" not supported', |
|
737 | self.document.reporter.warning('"image" not supported', | |
732 | base_node=node) |
|
738 | base_node=node) | |
733 | text = [] |
|
739 | text = [] | |
734 | if 'alt' in node.attributes: |
|
740 | if 'alt' in node.attributes: | |
735 | text.append(node.attributes['alt']) |
|
741 | text.append(node.attributes['alt']) | |
736 | if 'uri' in node.attributes: |
|
742 | if 'uri' in node.attributes: | |
737 | text.append(node.attributes['uri']) |
|
743 | text.append(node.attributes['uri']) | |
738 | self.body.append('[image: %s]\n' % ('/'.join(text))) |
|
744 | self.body.append('[image: %s]\n' % ('/'.join(text))) | |
739 | raise nodes.SkipNode |
|
745 | raise nodes.SkipNode | |
740 |
|
746 | |||
741 | def visit_important(self, node): |
|
747 | def visit_important(self, node): | |
742 | self.visit_admonition(node, 'important') |
|
748 | self.visit_admonition(node, 'important') | |
743 |
|
749 | |||
744 | depart_important = depart_admonition |
|
750 | depart_important = depart_admonition | |
745 |
|
751 | |||
746 | def visit_label(self, node): |
|
752 | def visit_label(self, node): | |
747 | # footnote and citation |
|
753 | # footnote and citation | |
748 | if (isinstance(node.parent, nodes.footnote) |
|
754 | if (isinstance(node.parent, nodes.footnote) | |
749 | or isinstance(node.parent, nodes.citation)): |
|
755 | or isinstance(node.parent, nodes.citation)): | |
750 | raise nodes.SkipNode |
|
756 | raise nodes.SkipNode | |
751 | self.document.reporter.warning('"unsupported "label"', |
|
757 | self.document.reporter.warning('"unsupported "label"', | |
752 | base_node=node) |
|
758 | base_node=node) | |
753 | self.body.append('[') |
|
759 | self.body.append('[') | |
754 |
|
760 | |||
755 | def depart_label(self, node): |
|
761 | def depart_label(self, node): | |
756 | self.body.append(']\n') |
|
762 | self.body.append(']\n') | |
757 |
|
763 | |||
758 | def visit_legend(self, node): |
|
764 | def visit_legend(self, node): | |
759 | pass |
|
765 | pass | |
760 |
|
766 | |||
761 | def depart_legend(self, node): |
|
767 | def depart_legend(self, node): | |
762 | pass |
|
768 | pass | |
763 |
|
769 | |||
764 | # WHAT should we use .INDENT, .UNINDENT ? |
|
770 | # WHAT should we use .INDENT, .UNINDENT ? | |
765 | def visit_line_block(self, node): |
|
771 | def visit_line_block(self, node): | |
766 | self._line_block += 1 |
|
772 | self._line_block += 1 | |
767 | if self._line_block == 1: |
|
773 | if self._line_block == 1: | |
768 | self.body.append('.sp\n') |
|
774 | self.body.append('.sp\n') | |
769 | self.body.append('.nf\n') |
|
775 | self.body.append('.nf\n') | |
770 | else: |
|
776 | else: | |
771 | self.body.append('.in +2\n') |
|
777 | self.body.append('.in +2\n') | |
772 |
|
778 | |||
773 | def depart_line_block(self, node): |
|
779 | def depart_line_block(self, node): | |
774 | self._line_block -= 1 |
|
780 | self._line_block -= 1 | |
775 | if self._line_block == 0: |
|
781 | if self._line_block == 0: | |
776 | self.body.append('.fi\n') |
|
782 | self.body.append('.fi\n') | |
777 | self.body.append('.sp\n') |
|
783 | self.body.append('.sp\n') | |
778 | else: |
|
784 | else: | |
779 | self.body.append('.in -2\n') |
|
785 | self.body.append('.in -2\n') | |
780 |
|
786 | |||
781 | def visit_line(self, node): |
|
787 | def visit_line(self, node): | |
782 | pass |
|
788 | pass | |
783 |
|
789 | |||
784 | def depart_line(self, node): |
|
790 | def depart_line(self, node): | |
785 | self.body.append('\n') |
|
791 | self.body.append('\n') | |
786 |
|
792 | |||
787 | def visit_list_item(self, node): |
|
793 | def visit_list_item(self, node): | |
788 | # man 7 man argues to use ".IP" instead of ".TP" |
|
794 | # man 7 man argues to use ".IP" instead of ".TP" | |
789 | self.body.append('.IP %s %d\n' % ( |
|
795 | self.body.append('.IP %s %d\n' % ( | |
790 | self._list_char[-1].next(), |
|
796 | self._list_char[-1].next(), | |
791 | self._list_char[-1].get_width(),)) |
|
797 | self._list_char[-1].get_width(),)) | |
792 |
|
798 | |||
793 | def depart_list_item(self, node): |
|
799 | def depart_list_item(self, node): | |
794 | pass |
|
800 | pass | |
795 |
|
801 | |||
796 | def visit_literal(self, node): |
|
802 | def visit_literal(self, node): | |
797 | self.body.append(self.defs['literal'][0]) |
|
803 | self.body.append(self.defs['literal'][0]) | |
798 |
|
804 | |||
799 | def depart_literal(self, node): |
|
805 | def depart_literal(self, node): | |
800 | self.body.append(self.defs['literal'][1]) |
|
806 | self.body.append(self.defs['literal'][1]) | |
801 |
|
807 | |||
802 | def visit_literal_block(self, node): |
|
808 | def visit_literal_block(self, node): | |
803 | self.body.append(self.defs['literal_block'][0]) |
|
809 | self.body.append(self.defs['literal_block'][0]) | |
804 | self._in_literal = True |
|
810 | self._in_literal = True | |
805 |
|
811 | |||
806 | def depart_literal_block(self, node): |
|
812 | def depart_literal_block(self, node): | |
807 | self._in_literal = False |
|
813 | self._in_literal = False | |
808 | self.body.append(self.defs['literal_block'][1]) |
|
814 | self.body.append(self.defs['literal_block'][1]) | |
809 |
|
815 | |||
810 | def visit_meta(self, node): |
|
816 | def visit_meta(self, node): | |
811 | raise NotImplementedError, node.astext() |
|
817 | raise NotImplementedError, node.astext() | |
812 |
|
818 | |||
813 | def depart_meta(self, node): |
|
819 | def depart_meta(self, node): | |
814 | pass |
|
820 | pass | |
815 |
|
821 | |||
816 | def visit_note(self, node): |
|
822 | def visit_note(self, node): | |
817 | self.visit_admonition(node, 'note') |
|
823 | self.visit_admonition(node, 'note') | |
818 |
|
824 | |||
819 | depart_note = depart_admonition |
|
825 | depart_note = depart_admonition | |
820 |
|
826 | |||
821 | def indent(self, by=0.5): |
|
827 | def indent(self, by=0.5): | |
822 | # if we are in a section ".SH" there already is a .RS |
|
828 | # if we are in a section ".SH" there already is a .RS | |
823 | step = self._indent[-1] |
|
829 | step = self._indent[-1] | |
824 | self._indent.append(by) |
|
830 | self._indent.append(by) | |
825 | self.body.append(self.defs['indent'][0] % step) |
|
831 | self.body.append(self.defs['indent'][0] % step) | |
826 |
|
832 | |||
827 | def dedent(self): |
|
833 | def dedent(self): | |
828 | self._indent.pop() |
|
834 | self._indent.pop() | |
829 | self.body.append(self.defs['indent'][1]) |
|
835 | self.body.append(self.defs['indent'][1]) | |
830 |
|
836 | |||
831 | def visit_option_list(self, node): |
|
837 | def visit_option_list(self, node): | |
832 | self.indent(OPTION_LIST_INDENT) |
|
838 | self.indent(OPTION_LIST_INDENT) | |
833 |
|
839 | |||
834 | def depart_option_list(self, node): |
|
840 | def depart_option_list(self, node): | |
835 | self.dedent() |
|
841 | self.dedent() | |
836 |
|
842 | |||
837 | def visit_option_list_item(self, node): |
|
843 | def visit_option_list_item(self, node): | |
838 | # one item of the list |
|
844 | # one item of the list | |
839 | self.body.append(self.defs['option_list_item'][0]) |
|
845 | self.body.append(self.defs['option_list_item'][0]) | |
840 |
|
846 | |||
841 | def depart_option_list_item(self, node): |
|
847 | def depart_option_list_item(self, node): | |
842 | self.body.append(self.defs['option_list_item'][1]) |
|
848 | self.body.append(self.defs['option_list_item'][1]) | |
843 |
|
849 | |||
844 | def visit_option_group(self, node): |
|
850 | def visit_option_group(self, node): | |
845 | # as one option could have several forms it is a group |
|
851 | # as one option could have several forms it is a group | |
846 | # options without parameter bold only, .B, -v |
|
852 | # options without parameter bold only, .B, -v | |
847 | # options with parameter bold italic, .BI, -f file |
|
853 | # options with parameter bold italic, .BI, -f file | |
848 | # |
|
854 | # | |
849 | # we do not know if .B or .BI |
|
855 | # we do not know if .B or .BI | |
850 | self.context.append('.B') # blind guess |
|
856 | self.context.append('.B') # blind guess | |
851 | self.context.append(len(self.body)) # to be able to insert later |
|
857 | self.context.append(len(self.body)) # to be able to insert later | |
852 | self.context.append(0) # option counter |
|
858 | self.context.append(0) # option counter | |
853 |
|
859 | |||
854 | def depart_option_group(self, node): |
|
860 | def depart_option_group(self, node): | |
855 | self.context.pop() # the counter |
|
861 | self.context.pop() # the counter | |
856 | start_position = self.context.pop() |
|
862 | start_position = self.context.pop() | |
857 | text = self.body[start_position:] |
|
863 | text = self.body[start_position:] | |
858 | del self.body[start_position:] |
|
864 | del self.body[start_position:] | |
859 | self.body.append('%s%s\n' % (self.context.pop(), ''.join(text))) |
|
865 | self.body.append('%s%s\n' % (self.context.pop(), ''.join(text))) | |
860 |
|
866 | |||
861 | def visit_option(self, node): |
|
867 | def visit_option(self, node): | |
862 | # each form of the option will be presented separately |
|
868 | # each form of the option will be presented separately | |
863 | if self.context[-1] > 0: |
|
869 | if self.context[-1] > 0: | |
864 | self.body.append(', ') |
|
870 | self.body.append(', ') | |
865 | if self.context[-3] == '.BI': |
|
871 | if self.context[-3] == '.BI': | |
866 | self.body.append('\\') |
|
872 | self.body.append('\\') | |
867 | self.body.append(' ') |
|
873 | self.body.append(' ') | |
868 |
|
874 | |||
869 | def depart_option(self, node): |
|
875 | def depart_option(self, node): | |
870 | self.context[-1] += 1 |
|
876 | self.context[-1] += 1 | |
871 |
|
877 | |||
872 | def visit_option_string(self, node): |
|
878 | def visit_option_string(self, node): | |
873 | # do not know if .B or .BI |
|
879 | # do not know if .B or .BI | |
874 | pass |
|
880 | pass | |
875 |
|
881 | |||
876 | def depart_option_string(self, node): |
|
882 | def depart_option_string(self, node): | |
877 | pass |
|
883 | pass | |
878 |
|
884 | |||
879 | def visit_option_argument(self, node): |
|
885 | def visit_option_argument(self, node): | |
880 | self.context[-3] = '.BI' # bold/italic alternate |
|
886 | self.context[-3] = '.BI' # bold/italic alternate | |
881 | if node['delimiter'] != ' ': |
|
887 | if node['delimiter'] != ' ': | |
882 | self.body.append('\\fB%s ' % node['delimiter']) |
|
888 | self.body.append('\\fB%s ' % node['delimiter']) | |
883 | elif self.body[len(self.body) - 1].endswith('='): |
|
889 | elif self.body[len(self.body) - 1].endswith('='): | |
884 | # a blank only means no blank in output, just changing font |
|
890 | # a blank only means no blank in output, just changing font | |
885 | self.body.append(' ') |
|
891 | self.body.append(' ') | |
886 | else: |
|
892 | else: | |
887 | # blank backslash blank, switch font then a blank |
|
893 | # blank backslash blank, switch font then a blank | |
888 | self.body.append(' \\ ') |
|
894 | self.body.append(' \\ ') | |
889 |
|
895 | |||
890 | def depart_option_argument(self, node): |
|
896 | def depart_option_argument(self, node): | |
891 | pass |
|
897 | pass | |
892 |
|
898 | |||
893 | def visit_organization(self, node): |
|
899 | def visit_organization(self, node): | |
894 | self.visit_docinfo_item(node, 'organization') |
|
900 | self.visit_docinfo_item(node, 'organization') | |
895 |
|
901 | |||
896 | def depart_organization(self, node): |
|
902 | def depart_organization(self, node): | |
897 | pass |
|
903 | pass | |
898 |
|
904 | |||
899 | def visit_paragraph(self, node): |
|
905 | def visit_paragraph(self, node): | |
900 | # ``.PP`` : Start standard indented paragraph. |
|
906 | # ``.PP`` : Start standard indented paragraph. | |
901 | # ``.LP`` : Start block paragraph, all except the first. |
|
907 | # ``.LP`` : Start block paragraph, all except the first. | |
902 | # ``.P [type]`` : Start paragraph type. |
|
908 | # ``.P [type]`` : Start paragraph type. | |
903 | # NOTE don't use paragraph starts because they reset indentation. |
|
909 | # NOTE don't use paragraph starts because they reset indentation. | |
904 | # ``.sp`` is only vertical space |
|
910 | # ``.sp`` is only vertical space | |
905 | self.ensure_eol() |
|
911 | self.ensure_eol() | |
906 | self.body.append('.sp\n') |
|
912 | self.body.append('.sp\n') | |
907 |
|
913 | |||
908 | def depart_paragraph(self, node): |
|
914 | def depart_paragraph(self, node): | |
909 | self.body.append('\n') |
|
915 | self.body.append('\n') | |
910 |
|
916 | |||
911 | def visit_problematic(self, node): |
|
917 | def visit_problematic(self, node): | |
912 | self.body.append(self.defs['problematic'][0]) |
|
918 | self.body.append(self.defs['problematic'][0]) | |
913 |
|
919 | |||
914 | def depart_problematic(self, node): |
|
920 | def depart_problematic(self, node): | |
915 | self.body.append(self.defs['problematic'][1]) |
|
921 | self.body.append(self.defs['problematic'][1]) | |
916 |
|
922 | |||
917 | def visit_raw(self, node): |
|
923 | def visit_raw(self, node): | |
918 | if node.get('format') == 'manpage': |
|
924 | if node.get('format') == 'manpage': | |
919 | self.body.append(node.astext() + "\n") |
|
925 | self.body.append(node.astext() + "\n") | |
920 | # Keep non-manpage raw text out of output: |
|
926 | # Keep non-manpage raw text out of output: | |
921 | raise nodes.SkipNode |
|
927 | raise nodes.SkipNode | |
922 |
|
928 | |||
923 | def visit_reference(self, node): |
|
929 | def visit_reference(self, node): | |
924 | """E.g. link or email address.""" |
|
930 | """E.g. link or email address.""" | |
925 | self.body.append(self.defs['reference'][0]) |
|
931 | self.body.append(self.defs['reference'][0]) | |
926 |
|
932 | |||
927 | def depart_reference(self, node): |
|
933 | def depart_reference(self, node): | |
928 | self.body.append(self.defs['reference'][1]) |
|
934 | self.body.append(self.defs['reference'][1]) | |
929 |
|
935 | |||
930 | def visit_revision(self, node): |
|
936 | def visit_revision(self, node): | |
931 | self.visit_docinfo_item(node, 'revision') |
|
937 | self.visit_docinfo_item(node, 'revision') | |
932 |
|
938 | |||
933 | depart_revision = depart_docinfo_item |
|
939 | depart_revision = depart_docinfo_item | |
934 |
|
940 | |||
935 | def visit_row(self, node): |
|
941 | def visit_row(self, node): | |
936 | self._active_table.new_row() |
|
942 | self._active_table.new_row() | |
937 |
|
943 | |||
938 | def depart_row(self, node): |
|
944 | def depart_row(self, node): | |
939 | pass |
|
945 | pass | |
940 |
|
946 | |||
941 | def visit_section(self, node): |
|
947 | def visit_section(self, node): | |
942 | self.section_level += 1 |
|
948 | self.section_level += 1 | |
943 |
|
949 | |||
944 | def depart_section(self, node): |
|
950 | def depart_section(self, node): | |
945 | self.section_level -= 1 |
|
951 | self.section_level -= 1 | |
946 |
|
952 | |||
947 | def visit_status(self, node): |
|
953 | def visit_status(self, node): | |
948 | self.visit_docinfo_item(node, 'status') |
|
954 | self.visit_docinfo_item(node, 'status') | |
949 |
|
955 | |||
950 | depart_status = depart_docinfo_item |
|
956 | depart_status = depart_docinfo_item | |
951 |
|
957 | |||
952 | def visit_strong(self, node): |
|
958 | def visit_strong(self, node): | |
953 | self.body.append(self.defs['strong'][0]) |
|
959 | self.body.append(self.defs['strong'][0]) | |
954 |
|
960 | |||
955 | def depart_strong(self, node): |
|
961 | def depart_strong(self, node): | |
956 | self.body.append(self.defs['strong'][1]) |
|
962 | self.body.append(self.defs['strong'][1]) | |
957 |
|
963 | |||
958 | def visit_substitution_definition(self, node): |
|
964 | def visit_substitution_definition(self, node): | |
959 | """Internal only.""" |
|
965 | """Internal only.""" | |
960 | raise nodes.SkipNode |
|
966 | raise nodes.SkipNode | |
961 |
|
967 | |||
962 | def visit_substitution_reference(self, node): |
|
968 | def visit_substitution_reference(self, node): | |
963 | self.document.reporter.warning('"substitution_reference" not supported', |
|
969 | self.document.reporter.warning('"substitution_reference" not supported', | |
964 | base_node=node) |
|
970 | base_node=node) | |
965 |
|
971 | |||
966 | def visit_subtitle(self, node): |
|
972 | def visit_subtitle(self, node): | |
967 | if isinstance(node.parent, nodes.sidebar): |
|
973 | if isinstance(node.parent, nodes.sidebar): | |
968 | self.body.append(self.defs['strong'][0]) |
|
974 | self.body.append(self.defs['strong'][0]) | |
969 | elif isinstance(node.parent, nodes.document): |
|
975 | elif isinstance(node.parent, nodes.document): | |
970 | self.visit_docinfo_item(node, 'subtitle') |
|
976 | self.visit_docinfo_item(node, 'subtitle') | |
971 | elif isinstance(node.parent, nodes.section): |
|
977 | elif isinstance(node.parent, nodes.section): | |
972 | self.body.append(self.defs['strong'][0]) |
|
978 | self.body.append(self.defs['strong'][0]) | |
973 |
|
979 | |||
974 | def depart_subtitle(self, node): |
|
980 | def depart_subtitle(self, node): | |
975 | # document subtitle calls SkipNode |
|
981 | # document subtitle calls SkipNode | |
976 | self.body.append(self.defs['strong'][1]+'\n.PP\n') |
|
982 | self.body.append(self.defs['strong'][1]+'\n.PP\n') | |
977 |
|
983 | |||
978 | def visit_system_message(self, node): |
|
984 | def visit_system_message(self, node): | |
979 | # TODO add report_level |
|
985 | # TODO add report_level | |
980 | #if node['level'] < self.document.reporter['writer'].report_level: |
|
986 | #if node['level'] < self.document.reporter['writer'].report_level: | |
981 | # Level is too low to display: |
|
987 | # Level is too low to display: | |
982 | # raise nodes.SkipNode |
|
988 | # raise nodes.SkipNode | |
983 | attr = {} |
|
989 | attr = {} | |
984 | if node.hasattr('id'): |
|
990 | if node.hasattr('id'): | |
985 | attr['name'] = node['id'] |
|
991 | attr['name'] = node['id'] | |
986 | if node.hasattr('line'): |
|
992 | if node.hasattr('line'): | |
987 | line = ', line %s' % node['line'] |
|
993 | line = ', line %s' % node['line'] | |
988 | else: |
|
994 | else: | |
989 | line = '' |
|
995 | line = '' | |
990 | self.body.append('.IP "System Message: %s/%s (%s:%s)"\n' |
|
996 | self.body.append('.IP "System Message: %s/%s (%s:%s)"\n' | |
991 | % (node['type'], node['level'], node['source'], line)) |
|
997 | % (node['type'], node['level'], node['source'], line)) | |
992 |
|
998 | |||
993 | def depart_system_message(self, node): |
|
999 | def depart_system_message(self, node): | |
994 | pass |
|
1000 | pass | |
995 |
|
1001 | |||
996 | def visit_table(self, node): |
|
1002 | def visit_table(self, node): | |
997 | self._active_table = Table() |
|
1003 | self._active_table = Table() | |
998 |
|
1004 | |||
999 | def depart_table(self, node): |
|
1005 | def depart_table(self, node): | |
1000 | self.ensure_eol() |
|
1006 | self.ensure_eol() | |
1001 | self.body.extend(self._active_table.as_list()) |
|
1007 | self.body.extend(self._active_table.as_list()) | |
1002 | self._active_table = None |
|
1008 | self._active_table = None | |
1003 |
|
1009 | |||
1004 | def visit_target(self, node): |
|
1010 | def visit_target(self, node): | |
1005 | # targets are in-document hyper targets, without any use for man-pages. |
|
1011 | # targets are in-document hyper targets, without any use for man-pages. | |
1006 | raise nodes.SkipNode |
|
1012 | raise nodes.SkipNode | |
1007 |
|
1013 | |||
1008 | def visit_tbody(self, node): |
|
1014 | def visit_tbody(self, node): | |
1009 | pass |
|
1015 | pass | |
1010 |
|
1016 | |||
1011 | def depart_tbody(self, node): |
|
1017 | def depart_tbody(self, node): | |
1012 | pass |
|
1018 | pass | |
1013 |
|
1019 | |||
1014 | def visit_term(self, node): |
|
1020 | def visit_term(self, node): | |
1015 | self.body.append(self.defs['term'][0]) |
|
1021 | self.body.append(self.defs['term'][0]) | |
1016 |
|
1022 | |||
1017 | def depart_term(self, node): |
|
1023 | def depart_term(self, node): | |
1018 | self.body.append(self.defs['term'][1]) |
|
1024 | self.body.append(self.defs['term'][1]) | |
1019 |
|
1025 | |||
1020 | def visit_tgroup(self, node): |
|
1026 | def visit_tgroup(self, node): | |
1021 | pass |
|
1027 | pass | |
1022 |
|
1028 | |||
1023 | def depart_tgroup(self, node): |
|
1029 | def depart_tgroup(self, node): | |
1024 | pass |
|
1030 | pass | |
1025 |
|
1031 | |||
1026 | def visit_thead(self, node): |
|
1032 | def visit_thead(self, node): | |
1027 | # MAYBE double line '=' |
|
1033 | # MAYBE double line '=' | |
1028 | pass |
|
1034 | pass | |
1029 |
|
1035 | |||
1030 | def depart_thead(self, node): |
|
1036 | def depart_thead(self, node): | |
1031 | # MAYBE double line '=' |
|
1037 | # MAYBE double line '=' | |
1032 | pass |
|
1038 | pass | |
1033 |
|
1039 | |||
1034 | def visit_tip(self, node): |
|
1040 | def visit_tip(self, node): | |
1035 | self.visit_admonition(node, 'tip') |
|
1041 | self.visit_admonition(node, 'tip') | |
1036 |
|
1042 | |||
1037 | depart_tip = depart_admonition |
|
1043 | depart_tip = depart_admonition | |
1038 |
|
1044 | |||
1039 | def visit_title(self, node): |
|
1045 | def visit_title(self, node): | |
1040 | if isinstance(node.parent, nodes.topic): |
|
1046 | if isinstance(node.parent, nodes.topic): | |
1041 | self.body.append(self.defs['topic-title'][0]) |
|
1047 | self.body.append(self.defs['topic-title'][0]) | |
1042 | elif isinstance(node.parent, nodes.sidebar): |
|
1048 | elif isinstance(node.parent, nodes.sidebar): | |
1043 | self.body.append(self.defs['sidebar-title'][0]) |
|
1049 | self.body.append(self.defs['sidebar-title'][0]) | |
1044 | elif isinstance(node.parent, nodes.admonition): |
|
1050 | elif isinstance(node.parent, nodes.admonition): | |
1045 | self.body.append('.IP "') |
|
1051 | self.body.append('.IP "') | |
1046 | elif self.section_level == 0: |
|
1052 | elif self.section_level == 0: | |
1047 | self._docinfo['title'] = node.astext() |
|
1053 | self._docinfo['title'] = node.astext() | |
1048 | # document title for .TH |
|
1054 | # document title for .TH | |
1049 | self._docinfo['title_upper'] = node.astext().upper() |
|
1055 | self._docinfo['title_upper'] = node.astext().upper() | |
1050 | raise nodes.SkipNode |
|
1056 | raise nodes.SkipNode | |
1051 | elif self.section_level == 1: |
|
1057 | elif self.section_level == 1: | |
1052 | self.body.append('.SH ') |
|
1058 | self.body.append('.SH ') | |
1053 | for n in node.traverse(nodes.Text): |
|
1059 | for n in node.traverse(nodes.Text): | |
1054 | n.parent.replace(n, nodes.Text(n.astext().upper())) |
|
1060 | n.parent.replace(n, nodes.Text(n.astext().upper())) | |
1055 | else: |
|
1061 | else: | |
1056 | self.body.append('.SS ') |
|
1062 | self.body.append('.SS ') | |
1057 |
|
1063 | |||
1058 | def depart_title(self, node): |
|
1064 | def depart_title(self, node): | |
1059 | if isinstance(node.parent, nodes.admonition): |
|
1065 | if isinstance(node.parent, nodes.admonition): | |
1060 | self.body.append('"') |
|
1066 | self.body.append('"') | |
1061 | self.body.append('\n') |
|
1067 | self.body.append('\n') | |
1062 |
|
1068 | |||
1063 | def visit_title_reference(self, node): |
|
1069 | def visit_title_reference(self, node): | |
1064 | """inline citation reference""" |
|
1070 | """inline citation reference""" | |
1065 | self.body.append(self.defs['title_reference'][0]) |
|
1071 | self.body.append(self.defs['title_reference'][0]) | |
1066 |
|
1072 | |||
1067 | def depart_title_reference(self, node): |
|
1073 | def depart_title_reference(self, node): | |
1068 | self.body.append(self.defs['title_reference'][1]) |
|
1074 | self.body.append(self.defs['title_reference'][1]) | |
1069 |
|
1075 | |||
1070 | def visit_topic(self, node): |
|
1076 | def visit_topic(self, node): | |
1071 | pass |
|
1077 | pass | |
1072 |
|
1078 | |||
1073 | def depart_topic(self, node): |
|
1079 | def depart_topic(self, node): | |
1074 | pass |
|
1080 | pass | |
1075 |
|
1081 | |||
1076 | def visit_sidebar(self, node): |
|
1082 | def visit_sidebar(self, node): | |
1077 | pass |
|
1083 | pass | |
1078 |
|
1084 | |||
1079 | def depart_sidebar(self, node): |
|
1085 | def depart_sidebar(self, node): | |
1080 | pass |
|
1086 | pass | |
1081 |
|
1087 | |||
1082 | def visit_rubric(self, node): |
|
1088 | def visit_rubric(self, node): | |
1083 | pass |
|
1089 | pass | |
1084 |
|
1090 | |||
1085 | def depart_rubric(self, node): |
|
1091 | def depart_rubric(self, node): | |
1086 | pass |
|
1092 | pass | |
1087 |
|
1093 | |||
1088 | def visit_transition(self, node): |
|
1094 | def visit_transition(self, node): | |
1089 | # .PP Begin a new paragraph and reset prevailing indent. |
|
1095 | # .PP Begin a new paragraph and reset prevailing indent. | |
1090 | # .sp N leaves N lines of blank space. |
|
1096 | # .sp N leaves N lines of blank space. | |
1091 | # .ce centers the next line |
|
1097 | # .ce centers the next line | |
1092 | self.body.append('\n.sp\n.ce\n----\n') |
|
1098 | self.body.append('\n.sp\n.ce\n----\n') | |
1093 |
|
1099 | |||
1094 | def depart_transition(self, node): |
|
1100 | def depart_transition(self, node): | |
1095 | self.body.append('\n.ce 0\n.sp\n') |
|
1101 | self.body.append('\n.ce 0\n.sp\n') | |
1096 |
|
1102 | |||
1097 | def visit_version(self, node): |
|
1103 | def visit_version(self, node): | |
1098 | self.visit_docinfo_item(node, 'version') |
|
1104 | self.visit_docinfo_item(node, 'version') | |
1099 |
|
1105 | |||
1100 | def visit_warning(self, node): |
|
1106 | def visit_warning(self, node): | |
1101 | self.visit_admonition(node, 'warning') |
|
1107 | self.visit_admonition(node, 'warning') | |
1102 |
|
1108 | |||
1103 | depart_warning = depart_admonition |
|
1109 | depart_warning = depart_admonition | |
1104 |
|
1110 | |||
1105 | def unimplemented_visit(self, node): |
|
1111 | def unimplemented_visit(self, node): | |
1106 | raise NotImplementedError('visiting unimplemented node type: %s' |
|
1112 | raise NotImplementedError('visiting unimplemented node type: %s' | |
1107 | % node.__class__.__name__) |
|
1113 | % node.__class__.__name__) | |
1108 |
|
1114 | |||
1109 | # vim: set fileencoding=utf-8 et ts=4 ai : |
|
1115 | # vim: set fileencoding=utf-8 et ts=4 ai : |
@@ -1,181 +1,180 b'' | |||||
1 | #require test-repo |
|
1 | #require test-repo | |
2 |
|
2 | |||
3 | $ cd "$TESTDIR"/.. |
|
3 | $ cd "$TESTDIR"/.. | |
4 |
|
4 | |||
5 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py |
|
5 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py | |
6 | doc/hgmanpage.py not using absolute_import |
|
|||
7 | hgext/color.py not using absolute_import |
|
6 | hgext/color.py not using absolute_import | |
8 | hgext/eol.py not using absolute_import |
|
7 | hgext/eol.py not using absolute_import | |
9 | hgext/extdiff.py not using absolute_import |
|
8 | hgext/extdiff.py not using absolute_import | |
10 | hgext/factotum.py not using absolute_import |
|
9 | hgext/factotum.py not using absolute_import | |
11 | hgext/fetch.py not using absolute_import |
|
10 | hgext/fetch.py not using absolute_import | |
12 | hgext/fsmonitor/pywatchman/__init__.py not using absolute_import |
|
11 | hgext/fsmonitor/pywatchman/__init__.py not using absolute_import | |
13 | hgext/fsmonitor/pywatchman/__init__.py requires print_function |
|
12 | hgext/fsmonitor/pywatchman/__init__.py requires print_function | |
14 | hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import |
|
13 | hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import | |
15 | hgext/fsmonitor/pywatchman/pybser.py not using absolute_import |
|
14 | hgext/fsmonitor/pywatchman/pybser.py not using absolute_import | |
16 | hgext/gpg.py not using absolute_import |
|
15 | hgext/gpg.py not using absolute_import | |
17 | hgext/graphlog.py not using absolute_import |
|
16 | hgext/graphlog.py not using absolute_import | |
18 | hgext/hgcia.py not using absolute_import |
|
17 | hgext/hgcia.py not using absolute_import | |
19 | hgext/hgk.py not using absolute_import |
|
18 | hgext/hgk.py not using absolute_import | |
20 | hgext/highlight/__init__.py not using absolute_import |
|
19 | hgext/highlight/__init__.py not using absolute_import | |
21 | hgext/highlight/highlight.py not using absolute_import |
|
20 | hgext/highlight/highlight.py not using absolute_import | |
22 | hgext/histedit.py not using absolute_import |
|
21 | hgext/histedit.py not using absolute_import | |
23 | hgext/largefiles/__init__.py not using absolute_import |
|
22 | hgext/largefiles/__init__.py not using absolute_import | |
24 | hgext/largefiles/basestore.py not using absolute_import |
|
23 | hgext/largefiles/basestore.py not using absolute_import | |
25 | hgext/largefiles/lfcommands.py not using absolute_import |
|
24 | hgext/largefiles/lfcommands.py not using absolute_import | |
26 | hgext/largefiles/lfutil.py not using absolute_import |
|
25 | hgext/largefiles/lfutil.py not using absolute_import | |
27 | hgext/largefiles/localstore.py not using absolute_import |
|
26 | hgext/largefiles/localstore.py not using absolute_import | |
28 | hgext/largefiles/overrides.py not using absolute_import |
|
27 | hgext/largefiles/overrides.py not using absolute_import | |
29 | hgext/largefiles/proto.py not using absolute_import |
|
28 | hgext/largefiles/proto.py not using absolute_import | |
30 | hgext/largefiles/remotestore.py not using absolute_import |
|
29 | hgext/largefiles/remotestore.py not using absolute_import | |
31 | hgext/largefiles/reposetup.py not using absolute_import |
|
30 | hgext/largefiles/reposetup.py not using absolute_import | |
32 | hgext/largefiles/uisetup.py not using absolute_import |
|
31 | hgext/largefiles/uisetup.py not using absolute_import | |
33 | hgext/largefiles/wirestore.py not using absolute_import |
|
32 | hgext/largefiles/wirestore.py not using absolute_import | |
34 | hgext/mq.py not using absolute_import |
|
33 | hgext/mq.py not using absolute_import | |
35 | hgext/rebase.py not using absolute_import |
|
34 | hgext/rebase.py not using absolute_import | |
36 | hgext/share.py not using absolute_import |
|
35 | hgext/share.py not using absolute_import | |
37 | hgext/win32text.py not using absolute_import |
|
36 | hgext/win32text.py not using absolute_import | |
38 | i18n/check-translation.py not using absolute_import |
|
37 | i18n/check-translation.py not using absolute_import | |
39 | i18n/polib.py not using absolute_import |
|
38 | i18n/polib.py not using absolute_import | |
40 | setup.py not using absolute_import |
|
39 | setup.py not using absolute_import | |
41 | tests/heredoctest.py requires print_function |
|
40 | tests/heredoctest.py requires print_function | |
42 | tests/md5sum.py not using absolute_import |
|
41 | tests/md5sum.py not using absolute_import | |
43 | tests/readlink.py not using absolute_import |
|
42 | tests/readlink.py not using absolute_import | |
44 | tests/readlink.py requires print_function |
|
43 | tests/readlink.py requires print_function | |
45 | tests/run-tests.py not using absolute_import |
|
44 | tests/run-tests.py not using absolute_import | |
46 | tests/svn-safe-append.py not using absolute_import |
|
45 | tests/svn-safe-append.py not using absolute_import | |
47 | tests/test-atomictempfile.py not using absolute_import |
|
46 | tests/test-atomictempfile.py not using absolute_import | |
48 | tests/test-demandimport.py not using absolute_import |
|
47 | tests/test-demandimport.py not using absolute_import | |
49 |
|
48 | |||
50 | #if py3exe |
|
49 | #if py3exe | |
51 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py |
|
50 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py | |
52 | contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob) |
|
51 | contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob) | |
53 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
52 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
54 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
53 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
55 | hgext/blackbox.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
54 | hgext/blackbox.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
56 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) |
|
55 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) | |
57 | hgext/censor.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
56 | hgext/censor.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
58 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
57 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) | |
59 | hgext/children.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
58 | hgext/children.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
60 | hgext/churn.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
59 | hgext/churn.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
61 | hgext/clonebundles.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
60 | hgext/clonebundles.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
62 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
61 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
63 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
62 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
64 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
63 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
65 | hgext/convert/convcmd.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
64 | hgext/convert/convcmd.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
66 | hgext/convert/cvs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
65 | hgext/convert/cvs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
67 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
66 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
68 | hgext/convert/darcs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
67 | hgext/convert/darcs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
69 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
68 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
70 | hgext/convert/git.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
69 | hgext/convert/git.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
71 | hgext/convert/gnuarch.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
70 | hgext/convert/gnuarch.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
72 | hgext/convert/hg.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
71 | hgext/convert/hg.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
73 | hgext/convert/monotone.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
72 | hgext/convert/monotone.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
74 | hgext/convert/p*.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
73 | hgext/convert/p*.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) | |
75 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
74 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
76 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) |
|
75 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) | |
77 | hgext/eol.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
76 | hgext/eol.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
78 | hgext/extdiff.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
77 | hgext/extdiff.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
79 | hgext/factotum.py: error importing: <ImportError> No module named 'httplib' (error at url.py:*) (glob) |
|
78 | hgext/factotum.py: error importing: <ImportError> No module named 'httplib' (error at url.py:*) (glob) | |
80 | hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
79 | hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
81 | hgext/fsmonitor/watchmanclient.py: error importing module: <SystemError> Parent module 'hgext.fsmonitor' not loaded, cannot perform relative import (line *) (glob) |
|
80 | hgext/fsmonitor/watchmanclient.py: error importing module: <SystemError> Parent module 'hgext.fsmonitor' not loaded, cannot perform relative import (line *) (glob) | |
82 | hgext/gpg.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
81 | hgext/gpg.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
83 | hgext/graphlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
82 | hgext/graphlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
84 | hgext/hgcia.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
83 | hgext/hgcia.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
85 | hgext/hgk.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
84 | hgext/hgk.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
86 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
85 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
87 | hgext/keyword.py: error importing: <ImportError> No module named 'BaseHTTPServer' (error at common.py:*) (glob) |
|
86 | hgext/keyword.py: error importing: <ImportError> No module named 'BaseHTTPServer' (error at common.py:*) (glob) | |
88 | hgext/largefiles/basestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
87 | hgext/largefiles/basestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
89 | hgext/largefiles/lfcommands.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
88 | hgext/largefiles/lfcommands.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
90 | hgext/largefiles/lfutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
89 | hgext/largefiles/lfutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
91 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
90 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) | |
92 | hgext/largefiles/overrides.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
91 | hgext/largefiles/overrides.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
93 | hgext/largefiles/proto.py: error importing: <ImportError> No module named 'httplib' (error at httppeer.py:*) (glob) |
|
92 | hgext/largefiles/proto.py: error importing: <ImportError> No module named 'httplib' (error at httppeer.py:*) (glob) | |
94 | hgext/largefiles/remotestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) |
|
93 | hgext/largefiles/remotestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) | |
95 | hgext/largefiles/reposetup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
94 | hgext/largefiles/reposetup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
96 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) |
|
95 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) | |
97 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
96 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) | |
98 | hgext/mq.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
97 | hgext/mq.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) | |
99 | hgext/notify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
98 | hgext/notify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
100 | hgext/pager.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
99 | hgext/pager.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
101 | hgext/patchbomb.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
100 | hgext/patchbomb.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
102 | hgext/purge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
101 | hgext/purge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
103 | hgext/rebase.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
102 | hgext/rebase.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
104 | hgext/record.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
103 | hgext/record.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
105 | hgext/relink.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
104 | hgext/relink.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
106 | hgext/schemes.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
105 | hgext/schemes.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
107 | hgext/share.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
106 | hgext/share.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
108 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
107 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
109 | hgext/strip.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
108 | hgext/strip.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
110 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
109 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
111 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
110 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
112 | mercurial/branchmap.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
111 | mercurial/branchmap.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
113 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
112 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
114 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
113 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
115 | mercurial/changegroup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
114 | mercurial/changegroup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
116 | mercurial/changelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
115 | mercurial/changelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
117 | mercurial/cmdutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
116 | mercurial/cmdutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
118 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
117 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
119 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
118 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) | |
120 | mercurial/context.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
119 | mercurial/context.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
121 | mercurial/copies.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
120 | mercurial/copies.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
122 | mercurial/crecord.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
121 | mercurial/crecord.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
123 | mercurial/dirstate.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
122 | mercurial/dirstate.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
124 | mercurial/discovery.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
123 | mercurial/discovery.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
125 | mercurial/dispatch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
124 | mercurial/dispatch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
126 | mercurial/exchange.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
125 | mercurial/exchange.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
127 | mercurial/extensions.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
126 | mercurial/extensions.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
128 | mercurial/filelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
127 | mercurial/filelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
129 | mercurial/filemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
128 | mercurial/filemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
130 | mercurial/fileset.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
129 | mercurial/fileset.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
131 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
130 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) | |
132 | mercurial/graphmod.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
131 | mercurial/graphmod.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
133 | mercurial/help.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
132 | mercurial/help.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
134 | mercurial/hg.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
133 | mercurial/hg.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) | |
135 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
134 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) | |
136 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
135 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
137 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
136 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
138 | mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
137 | mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
139 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
138 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
140 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
139 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) | |
141 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
140 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
142 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
141 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
143 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
142 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) | |
144 | mercurial/hook.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
143 | mercurial/hook.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
145 | mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
144 | mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
146 | mercurial/httpconnection.py: error importing: <ImportError> No module named 'httplib' (error at __init__.py:*) (glob) |
|
145 | mercurial/httpconnection.py: error importing: <ImportError> No module named 'httplib' (error at __init__.py:*) (glob) | |
147 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
146 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
148 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
147 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
149 | mercurial/localrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
148 | mercurial/localrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
150 | mercurial/mail.py: error importing module: <AttributeError> module 'email' has no attribute 'Header' (line *) (glob) |
|
149 | mercurial/mail.py: error importing module: <AttributeError> module 'email' has no attribute 'Header' (line *) (glob) | |
151 | mercurial/manifest.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
150 | mercurial/manifest.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
152 | mercurial/merge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
151 | mercurial/merge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
153 | mercurial/namespaces.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
152 | mercurial/namespaces.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
154 | mercurial/patch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
153 | mercurial/patch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
155 | mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line *) (glob) |
|
154 | mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line *) (glob) | |
156 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob) |
|
155 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob) | |
157 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
156 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
158 | mercurial/revlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
157 | mercurial/revlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
159 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) (glob) |
|
158 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) (glob) | |
160 | mercurial/scmutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
159 | mercurial/scmutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
161 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
160 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) | |
162 | mercurial/simplemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
161 | mercurial/simplemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
163 | mercurial/sshpeer.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) |
|
162 | mercurial/sshpeer.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) | |
164 | mercurial/sshserver.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
163 | mercurial/sshserver.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
165 | mercurial/statichttprepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
164 | mercurial/statichttprepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
166 | mercurial/store.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
165 | mercurial/store.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
167 | mercurial/streamclone.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
166 | mercurial/streamclone.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
168 | mercurial/subrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
167 | mercurial/subrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
169 | mercurial/templatefilters.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
168 | mercurial/templatefilters.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
170 | mercurial/templatekw.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
169 | mercurial/templatekw.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
171 | mercurial/templater.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
170 | mercurial/templater.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
172 | mercurial/ui.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob) |
|
171 | mercurial/ui.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob) | |
173 | mercurial/unionrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
172 | mercurial/unionrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
174 | mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
173 | mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) | |
175 | mercurial/verify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
174 | mercurial/verify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) | |
176 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) |
|
175 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) | |
177 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
176 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) | |
178 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
177 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) | |
179 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
178 | tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) | |
180 |
|
179 | |||
181 | #endif |
|
180 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now