Debian Codegraph @

tests/test-execute-bit.t

raw
1 #require execbit
2
3 $ hg init repo
4 $ cd repo
5 $ echo a > a
6 $ hg ci -Am'not executable'
7 adding a
8
9 $ chmod +x a
10 $ hg ci -m'executable'
11 $ hg id
12 79abf14474dc tip
13
14 Make sure we notice the change of mode if the cached size == -1:
15
16 $ hg rm a
17 $ hg revert -r 0 a
18 $ hg debugstate
19 n 0 -1 unset a
20 $ hg status
21 M a
22
23 $ hg up 0
24 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 $ hg id
26 d69afc33ff8a
27 $ test -x a && echo executable -- bad || echo not executable -- good
28 not executable -- good
29
30 #if unix-permissions
31
32 Executable file permissions follow the umask during update. The Python update path
33 creates an executable file with mode 0775 under umask 0002.
34
35 $ hg up -q null
36 $ (umask 0002; hg up -q 1 --config rust.update-from-null=false --config rust.update-from-clean=false)
37 $ f --mode a
38 a: mode=775
39
40 The Rust update-from-null path should behave the same way.
41
42 #if rust
43 $ hg up -q null
44 $ (umask 0002; hg up -q 1 --config rust.update-from-null=true)
45 $ f --mode a
46 a: mode=775
47 #endif
48
49 #endif
50