comparison tests/test-inherit-mode.t @ 40794:d5622dfe4ba3

cache: create `wcache` directory at init time The cache directory will be needed very quickly, so it seems simpler to create it early to make sure it has the same owner and permission than the other directory in the repository.
author Boris Feld <boris.feld@octobus.net>
date Thu, 15 Nov 2018 02:46:31 +0100
parents 64cdfcc73706
children 59aed775610a
comparison
equal deleted inserted replaced
40793:64cdfcc73706 40794:d5622dfe4ba3
40 $ umask 077 40 $ umask 077
41 41
42 $ hg init repo 42 $ hg init repo
43 $ cd repo 43 $ cd repo
44 44
45 $ chmod 0770 .hg/store .hg/cache 45 $ chmod 0770 .hg/store .hg/cache .hg/wcache
46 46
47 before commit 47 before commit
48 store can be written by the group, other files cannot 48 store can be written by the group, other files cannot
49 store is setgid 49 store is setgid
50 50
52 00700 ./.hg/ 52 00700 ./.hg/
53 00600 ./.hg/00changelog.i 53 00600 ./.hg/00changelog.i
54 00770 ./.hg/cache/ 54 00770 ./.hg/cache/
55 00600 ./.hg/requires 55 00600 ./.hg/requires
56 00770 ./.hg/store/ 56 00770 ./.hg/store/
57 00770 ./.hg/wcache/
57 58
58 $ mkdir dir 59 $ mkdir dir
59 $ touch foo dir/bar 60 $ touch foo dir/bar
60 $ hg ci -qAm 'add files' 61 $ hg ci -qAm 'add files'
61 62
118 00770 ../push/.hg/ 119 00770 ../push/.hg/
119 00660 ../push/.hg/00changelog.i 120 00660 ../push/.hg/00changelog.i
120 00770 ../push/.hg/cache/ 121 00770 ../push/.hg/cache/
121 00660 ../push/.hg/requires 122 00660 ../push/.hg/requires
122 00770 ../push/.hg/store/ 123 00770 ../push/.hg/store/
124 00770 ../push/.hg/wcache/
123 125
124 $ umask 077 126 $ umask 077
125 $ hg -q push ../push 127 $ hg -q push ../push
126 128
127 after push 129 after push
153 00660 ../push/.hg/store/undo.phaseroots 155 00660 ../push/.hg/store/undo.phaseroots
154 00660 ../push/.hg/undo.bookmarks 156 00660 ../push/.hg/undo.bookmarks
155 00660 ../push/.hg/undo.branch 157 00660 ../push/.hg/undo.branch
156 00660 ../push/.hg/undo.desc 158 00660 ../push/.hg/undo.desc
157 00660 ../push/.hg/undo.dirstate 159 00660 ../push/.hg/undo.dirstate
160 00770 ../push/.hg/wcache/
158 161
159 162
160 Test that we don't lose the setgid bit when we call chmod. 163 Test that we don't lose the setgid bit when we call chmod.
161 Not all systems support setgid directories (e.g. HFS+), so 164 Not all systems support setgid directories (e.g. HFS+), so
162 just check that directories have the same mode. 165 just check that directories have the same mode.