mercurial/context.py
changeset 11702 eb07fbc21e9c
parent 11605 ce95d8b87d22
child 11703 55a2af02e45c
--- a/mercurial/context.py	Wed Jul 28 11:07:20 2010 +0200
+++ b/mercurial/context.py	Tue Jul 27 23:40:46 2010 +0900
@@ -352,12 +352,12 @@
     def size(self):
         return self._filelog.size(self._filerev)
 
-    def cmp(self, text):
-        """compare text with stored file revision
+    def cmp(self, fctx):
+        """compare with other file context
 
-        returns True if text is different than what is stored.
+        returns True if different than fctx.
         """
-        return self._filelog.cmp(self._filenode, text)
+        return self._filelog.cmp(self._filenode, fctx.data())
 
     def renamed(self):
         """check if file was actually renamed in this changeset revision
@@ -935,12 +935,12 @@
                 raise
             return (t, tz)
 
-    def cmp(self, text):
-        """compare text with disk content
+    def cmp(self, fctx):
+        """compare with other file context
 
-        returns True if text is different than what is on disk.
+        returns True if different than fctx.
         """
-        return self._repo.wread(self._path) != text
+        return self._repo.wread(self._path) != fctx.data()
 
 class memctx(object):
     """Use memctx to perform in-memory commits via localrepo.commitctx().