Mercurial > hg
comparison tests/test-update-atomic.t @ 46226:0826d684a1b5
test: replace a many occurence of `python` with `$PYTHON`
Otherwise this can use the wrong python version, or worse, not find any python
at all.
Differential Revision: https://phab.mercurial-scm.org/D9730
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 12 Jan 2021 22:43:55 +0100 |
parents | 1bc345d488fd |
children | 1d075b857c90 |
comparison
equal
deleted
inserted
replaced
46225:88dfe1c279bb | 46226:0826d684a1b5 |
---|---|
52 | 52 |
53 $ hg update -r 0 -q | 53 $ hg update -r 0 -q |
54 $ hg update -r 1 --config extensions.showwrites=.hg/showwrites.py 2>&1 | grep "a1'.*wb" | 54 $ hg update -r 1 --config extensions.showwrites=.hg/showwrites.py 2>&1 | grep "a1'.*wb" |
55 ('vfs open', ('a1', 'wb'), [('atomictemp', False), ('backgroundclose', True)]) | 55 ('vfs open', ('a1', 'wb'), [('atomictemp', False), ('backgroundclose', True)]) |
56 | 56 |
57 $ python $TESTTMP/show_mode.py * | 57 $ $PYTHON $TESTTMP/show_mode.py * |
58 a1:0644 | 58 a1:0644 |
59 a2:0755 | 59 a2:0755 |
60 b1:0644 | 60 b1:0644 |
61 b2:0755 | 61 b2:0755 |
62 d:0644 | 62 d:0644 |
74 $ hg update -C -r 0 -q | 74 $ hg update -C -r 0 -q |
75 | 75 |
76 $ hg update -r 1 | 76 $ hg update -r 1 |
77 6 files updated, 0 files merged, 1 files removed, 0 files unresolved | 77 6 files updated, 0 files merged, 1 files removed, 0 files unresolved |
78 | 78 |
79 $ python $TESTTMP/show_mode.py * | 79 $ $PYTHON $TESTTMP/show_mode.py * |
80 a1:0644 | 80 a1:0644 |
81 a2:0755 | 81 a2:0755 |
82 b1:0644 | 82 b1:0644 |
83 b2:0755 | 83 b2:0755 |
84 d:0644 | 84 d:0644 |
86 | 86 |
87 Manually reset the mode of the read-only file | 87 Manually reset the mode of the read-only file |
88 | 88 |
89 $ chmod a-w ro | 89 $ chmod a-w ro |
90 | 90 |
91 $ python $TESTTMP/show_mode.py ro | 91 $ $PYTHON $TESTTMP/show_mode.py ro |
92 ro:0444 | 92 ro:0444 |
93 | 93 |
94 Now the file is present, try to update and check the permissions of the file | 94 Now the file is present, try to update and check the permissions of the file |
95 | 95 |
96 $ hg up -r 2 | 96 $ hg up -r 2 |
97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
98 | 98 |
99 $ python $TESTTMP/show_mode.py ro | 99 $ $PYTHON $TESTTMP/show_mode.py ro |
100 ro:0644 | 100 ro:0644 |
101 | 101 |
102 # The file which was read-only is now writable in the default behavior | 102 # The file which was read-only is now writable in the default behavior |
103 | 103 |
104 Check behavior with update.atomic-files | 104 Check behavior with update.atomic-files |
119 C b2 | 119 C b2 |
120 C d | 120 C d |
121 C ro | 121 C ro |
122 | 122 |
123 Check the file permission after update | 123 Check the file permission after update |
124 $ python $TESTTMP/show_mode.py * | 124 $ $PYTHON $TESTTMP/show_mode.py * |
125 a1:0644 | 125 a1:0644 |
126 a2:0755 | 126 a2:0755 |
127 b1:0644 | 127 b1:0644 |
128 b2:0755 | 128 b2:0755 |
129 d:0644 | 129 d:0644 |
131 | 131 |
132 Manually reset the mode of the read-only file | 132 Manually reset the mode of the read-only file |
133 | 133 |
134 $ chmod a-w ro | 134 $ chmod a-w ro |
135 | 135 |
136 $ python $TESTTMP/show_mode.py ro | 136 $ $PYTHON $TESTTMP/show_mode.py ro |
137 ro:0444 | 137 ro:0444 |
138 | 138 |
139 Now the file is present, try to update and check the permissions of the file | 139 Now the file is present, try to update and check the permissions of the file |
140 | 140 |
141 $ hg update -r 2 --traceback | 141 $ hg update -r 2 --traceback |
142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
143 | 143 |
144 $ python $TESTTMP/show_mode.py ro | 144 $ $PYTHON $TESTTMP/show_mode.py ro |
145 ro:0644 | 145 ro:0644 |
146 | 146 |
147 # The behavior is the same as without atomic update | 147 # The behavior is the same as without atomic update |