136 if name != target: |
136 if name != target: |
137 return opener(name, mode) |
137 return opener(name, mode) |
138 return appender(opener, name, mode, buf) |
138 return appender(opener, name, mode, buf) |
139 return _delay |
139 return _delay |
140 |
140 |
141 _changelogrevision = collections.namedtuple('changelogrevision', |
141 _changelogrevision = collections.namedtuple(u'changelogrevision', |
142 ('manifest', 'user', 'date', |
142 (u'manifest', u'user', u'date', |
143 'files', 'description', 'extra')) |
143 u'files', u'description', |
|
144 u'extra')) |
144 |
145 |
145 class changelogrevision(object): |
146 class changelogrevision(object): |
146 """Holds results of a parsed changelog revision. |
147 """Holds results of a parsed changelog revision. |
147 |
148 |
148 Changelog revisions consist of multiple pieces of data, including |
149 Changelog revisions consist of multiple pieces of data, including |
149 the manifest node, user, and date. This object exposes a view into |
150 the manifest node, user, and date. This object exposes a view into |
150 the parsed object. |
151 the parsed object. |
151 """ |
152 """ |
152 |
153 |
153 __slots__ = ( |
154 __slots__ = ( |
154 '_offsets', |
155 u'_offsets', |
155 '_text', |
156 u'_text', |
156 ) |
157 ) |
157 |
158 |
158 def __new__(cls, text): |
159 def __new__(cls, text): |
159 if not text: |
160 if not text: |
160 return _changelogrevision( |
161 return _changelogrevision( |