##// END OF EJS Templates
context: add cmp for filectxs
Matt Mackall -
r3310:0e370798 default
parent child Browse files
Show More
@@ -193,6 +193,8 b' class filectx(object):'
193 def path(self): return self._path
193 def path(self): return self._path
194 def size(self): return self._filelog.size(self._filerev)
194 def size(self): return self._filelog.size(self._filerev)
195
195
196 def cmp(self, text): return self._filelog.cmp(self._filenode, text)
197
196 def parents(self):
198 def parents(self):
197 p = self._path
199 p = self._path
198 fl = self._filelog
200 fl = self._filelog
@@ -467,3 +469,5 b' class workingfilectx(filectx):'
467 return []
469 return []
468
470
469 def size(self): return os.stat(self._repo.wjoin(self._path)).st_size
471 def size(self): return os.stat(self._repo.wjoin(self._path)).st_size
472
473 def cmp(self, text): return self._repo.wread(self._path) == text
General Comments 0
You need to be logged in to leave comments. Login now