##// END OF EJS Templates
localrepo.status: fcmp gets a getnode function instead of the manifest
Alexis S. L. Carvalho -
r4160:b4bd2f3e default
parent child Browse files
Show More
@@ -881,9 +881,9 b' class localrepository(repo.repository):'
881 If node2 is None, compare node1 with working directory.
881 If node2 is None, compare node1 with working directory.
882 """
882 """
883
883
884 def fcmp(fn, mf):
884 def fcmp(fn, getnode):
885 t1 = self.wread(fn)
885 t1 = self.wread(fn)
886 return self.file(fn).cmp(mf.get(fn, nullid), t1)
886 return self.file(fn).cmp(getnode(fn), t1)
887
887
888 def mfmatches(node):
888 def mfmatches(node):
889 change = self.changelog.read(node)
889 change = self.changelog.read(node)
@@ -922,8 +922,9 b' class localrepository(repo.repository):'
922 if lookup:
922 if lookup:
923 # do a full compare of any files that might have changed
923 # do a full compare of any files that might have changed
924 mf2 = mfmatches(self.dirstate.parents()[0])
924 mf2 = mfmatches(self.dirstate.parents()[0])
925 getnode = lambda fn: mf2.get(fn, nullid)
925 for f in lookup:
926 for f in lookup:
926 if fcmp(f, mf2):
927 if fcmp(f, getnode):
927 modified.append(f)
928 modified.append(f)
928 else:
929 else:
929 clean.append(f)
930 clean.append(f)
@@ -954,10 +955,12 b' class localrepository(repo.repository):'
954 # reasonable order
955 # reasonable order
955 mf2keys = mf2.keys()
956 mf2keys = mf2.keys()
956 mf2keys.sort()
957 mf2keys.sort()
958 getnode = lambda fn: mf1.get(fn, nullid)
957 for fn in mf2keys:
959 for fn in mf2keys:
958 if mf1.has_key(fn):
960 if mf1.has_key(fn):
959 if mf1.flags(fn) != mf2.flags(fn) or \
961 if mf1.flags(fn) != mf2.flags(fn) or \
960 (mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1))):
962 (mf1[fn] != mf2[fn] and (mf2[fn] != "" or
963 fcmp(fn, getnode))):
961 modified.append(fn)
964 modified.append(fn)
962 elif list_clean:
965 elif list_clean:
963 clean.append(fn)
966 clean.append(fn)
General Comments 0
You need to be logged in to leave comments. Login now