diff -r e68908edebba -r 1d488f7be492 mercurial/crecord.py --- a/mercurial/crecord.py Wed Feb 14 22:42:08 2024 -0500 +++ b/mercurial/crecord.py Wed Feb 14 22:43:51 2024 -0500 @@ -86,6 +86,10 @@ (i.e. patchroot, header, hunk, hunkline) """ + @property + def content(self): + return b'' + def firstchild(self): raise NotImplementedError(b"method must be implemented by subclass") @@ -223,6 +227,10 @@ self.neverunfolded = True self.hunks = [uihunk(h, self) for h in self.hunks] + @property + def content(self): + return self.filename() + def prettystr(self): x = stringio() self.pretty(x) @@ -289,6 +297,10 @@ # in the previtem method. self.folded = False + @property + def content(self): + return self.linetext + def prettystr(self): return self.linetext @@ -347,6 +359,10 @@ # children are partially applied (i.e. some applied, some not). self.partial = False + @property + def content(self): + return self.proc if self.proc else b'' + def nextsibling(self): numhunksinheader = len(self.header.hunks) indexofthishunk = self.header.hunks.index(self)