Mercurial > hg
comparison mercurial/context.py @ 33901:f488223a87ab
context: add `decodeddata()` to basefilectx
This will be used as an abstraction by simplemerge to get the data it used to
read off the filesystem.
Differential Revision: https://phab.mercurial-scm.org/D434
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Thu, 24 Aug 2017 21:26:40 -0700 |
parents | 4abf34f47526 |
children | c714e82b9ac2 |
comparison
equal
deleted
inserted
replaced
33900:10f1809ab98f | 33901:f488223a87ab |
---|---|
1095 if not visit: | 1095 if not visit: |
1096 break | 1096 break |
1097 c = visit.pop(max(visit)) | 1097 c = visit.pop(max(visit)) |
1098 yield c | 1098 yield c |
1099 | 1099 |
1100 def decodeddata(self): | |
1101 """Returns `data()` after running repository decoding filters. | |
1102 | |
1103 This is often equivalent to how the data would be expressed on disk. | |
1104 """ | |
1105 return self._repo.wwritedata(self.path(), self.data()) | |
1106 | |
1100 def _annotatepair(parents, childfctx, child, skipchild, diffopts): | 1107 def _annotatepair(parents, childfctx, child, skipchild, diffopts): |
1101 r''' | 1108 r''' |
1102 Given parent and child fctxes and annotate data for parents, for all lines | 1109 Given parent and child fctxes and annotate data for parents, for all lines |
1103 in either parent that match the child, annotate the child with the parent's | 1110 in either parent that match the child, annotate the child with the parent's |
1104 data. | 1111 data. |