##// END OF EJS Templates
repo.status: also compare flags for files in the lookup list....
Alexis S. L. Carvalho -
r6158:23ffe826 default
parent child Browse files
Show More
@@ -1003,8 +1003,15 b' class localrepository(repo.repository):'
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)
@@ -4,12 +4,18 b''
4
4
5 hg init
5 hg init
6 echo a > a
6 echo a > a
7 hg ci -d'0 0' -Am'not executable'
7 hg ci -Am'not executable'
8
8
9 chmod +x a
9 chmod +x a
10 hg ci -d'1 0' -m'executable'
10 hg ci -m'executable'
11 hg id
11 hg id
12
12
13 echo '% make sure we notice the change of mode if the cached size == -1'
14 hg rm a
15 hg revert -r 0 a
16 hg debugstate
17 hg st
18
13 hg up 0
19 hg up 0
14 hg id
20 hg id
15 test -x a && echo executable -- eek || echo not executable -- whew
21 test -x a && echo executable -- eek || echo not executable -- whew
@@ -1,5 +1,8 b''
1 adding a
1 adding a
2 1549299e88d1 tip
2 79abf14474dc tip
3 % make sure we notice the change of mode if the cached size == -1
4 n 0 -1 unset a
5 M a
3 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 d69afc33ff8a
7 d69afc33ff8a
5 not executable -- whew
8 not executable -- whew
General Comments 0
You need to be logged in to leave comments. Login now