diff mercurial/localrepo.py @ 11702:eb07fbc21e9c

filectx: use cmp(self, fctx) instead of cmp(self, text) This allows more flexibility in implementation, and in particular, lets the context decide if revision text has to be loaded or not.
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Tue, 27 Jul 2010 23:40:46 +0900
parents 9df481f8036d
children 01778673aab7
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Jul 28 11:07:20 2010 +0200
+++ b/mercurial/localrepo.py	Tue Jul 27 23:40:46 2010 +0900
@@ -1062,7 +1062,7 @@
                 # do a full compare of any files that might have changed
                 for f in sorted(cmp):
                     if (f not in ctx1 or ctx2.flags(f) != ctx1.flags(f)
-                        or ctx1[f].cmp(ctx2[f].data())):
+                        or ctx1[f].cmp(ctx2[f])):
                         modified.append(f)
                     else:
                         fixup.append(f)
@@ -1106,7 +1106,7 @@
                 if fn in mf1:
                     if (mf1.flags(fn) != mf2.flags(fn) or
                         (mf1[fn] != mf2[fn] and
-                         (mf2[fn] or ctx1[fn].cmp(ctx2[fn].data())))):
+                         (mf2[fn] or ctx1[fn].cmp(ctx2[fn])))):
                         modified.append(fn)
                     elif listclean:
                         clean.append(fn)