Show More
@@ -86,6 +86,10 b' class patchnode:' | |||
|
86 | 86 | (i.e. patchroot, header, hunk, hunkline) |
|
87 | 87 | """ |
|
88 | 88 | |
|
89 | @property | |
|
90 | def content(self): | |
|
91 | return b'' | |
|
92 | ||
|
89 | 93 | def firstchild(self): |
|
90 | 94 | raise NotImplementedError(b"method must be implemented by subclass") |
|
91 | 95 | |
@@ -223,6 +227,10 b' class uiheader(patchnode):' | |||
|
223 | 227 | self.neverunfolded = True |
|
224 | 228 | self.hunks = [uihunk(h, self) for h in self.hunks] |
|
225 | 229 | |
|
230 | @property | |
|
231 | def content(self): | |
|
232 | return self.filename() | |
|
233 | ||
|
226 | 234 | def prettystr(self): |
|
227 | 235 | x = stringio() |
|
228 | 236 | self.pretty(x) |
@@ -289,6 +297,10 b' class uihunkline(patchnode):' | |||
|
289 | 297 | # in the previtem method. |
|
290 | 298 | self.folded = False |
|
291 | 299 | |
|
300 | @property | |
|
301 | def content(self): | |
|
302 | return self.linetext | |
|
303 | ||
|
292 | 304 | def prettystr(self): |
|
293 | 305 | return self.linetext |
|
294 | 306 | |
@@ -347,6 +359,10 b' class uihunk(patchnode):' | |||
|
347 | 359 | # children are partially applied (i.e. some applied, some not). |
|
348 | 360 | self.partial = False |
|
349 | 361 | |
|
362 | @property | |
|
363 | def content(self): | |
|
364 | return self.proc if self.proc else b'' | |
|
365 | ||
|
350 | 366 | def nextsibling(self): |
|
351 | 367 | numhunksinheader = len(self.header.hunks) |
|
352 | 368 | indexofthishunk = self.header.hunks.index(self) |
General Comments 0
You need to be logged in to leave comments.
Login now