##// END OF EJS Templates
changelog: lazily parse files...
Gregory Szorc -
r28493:7796473c default
parent child Browse files
Show More
@@ -153,7 +153,7 b' class changelogrevision(object):'
153 153 __slots__ = (
154 154 '_rawdateextra',
155 155 '_rawdesc',
156 'files',
156 '_rawfiles',
157 157 '_rawmanifest',
158 158 '_rawuser',
159 159 )
@@ -196,8 +196,12 b' class changelogrevision(object):'
196 196 nl3 = text.index('\n', nl2 + 1)
197 197 self._rawdateextra = text[nl2 + 1:nl3]
198 198
199 l = text[:doublenl].split('\n')
200 self.files = l[3:]
199 # The list of files may be empty. Which means nl3 is the first of the
200 # double newline that precedes the description.
201 if nl3 == doublenl:
202 self._rawfiles = None
203 else:
204 self._rawfiles = text[nl3 + 1:doublenl]
201 205
202 206 return self
203 207
@@ -242,6 +246,13 b' class changelogrevision(object):'
242 246 return decodeextra(raw)
243 247
244 248 @property
249 def files(self):
250 if self._rawfiles is None:
251 return []
252
253 return self._rawfiles.split('\n')
254
255 @property
245 256 def description(self):
246 257 return encoding.tolocal(self._rawdesc)
247 258
General Comments 0
You need to be logged in to leave comments. Login now