comparison mercurial/localrepo.py @ 6158:23ffe82615d8

repo.status: also compare flags for files in the lookup list. We might be able to do something smarter about this in dirstate.status for files in normallookup state, but that would require some extra care to keep backwards compatibility.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 21 Feb 2008 16:22:31 -0300
parents 989467e8e3a9
children d500aeb8092e
comparison
equal deleted inserted replaced
6157:09b00faa8670 6158:23ffe82615d8
1001 if compareworking: 1001 if compareworking:
1002 if lookup: 1002 if lookup:
1003 fixup = [] 1003 fixup = []
1004 # do a full compare of any files that might have changed 1004 # do a full compare of any files that might have changed
1005 ctx = self.changectx() 1005 ctx = self.changectx()
1006 mexec = lambda f: 'x' in ctx.fileflags(f)
1007 mlink = lambda f: 'l' in ctx.fileflags(f)
1008 is_exec = util.execfunc(self.root, mexec)
1009 is_link = util.linkfunc(self.root, mlink)
1010 def flags(f):
1011 return is_link(f) and 'l' or is_exec(f) and 'x' or ''
1006 for f in lookup: 1012 for f in lookup:
1007 if f not in ctx or ctx[f].cmp(self.wread(f)): 1013 if (f not in ctx or flags(f) != ctx.fileflags(f)
1014 or ctx[f].cmp(self.wread(f))):
1008 modified.append(f) 1015 modified.append(f)
1009 else: 1016 else:
1010 fixup.append(f) 1017 fixup.append(f)
1011 if list_clean: 1018 if list_clean:
1012 clean.append(f) 1019 clean.append(f)