Mercurial > hg
comparison tests/test-sparse.t @ 44724:5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
BSD-derived systems will use "ls -A" when running as root. Adjust the
test cases to always use the flag and include .hg and related output as
appropiately.
Differential Revision: https://phab.mercurial-scm.org/D8397
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Fri, 10 Apr 2020 19:58:34 +0200 |
parents | 7e99b02768ef |
children | dc5e5577af39 |
comparison
equal
deleted
inserted
replaced
44723:28aacddf3af0 | 44724:5c2a4f37eace |
---|---|
20 | 20 |
21 Verify basic --include | 21 Verify basic --include |
22 | 22 |
23 $ hg up -q 0 | 23 $ hg up -q 0 |
24 $ hg debugsparse --include 'hide' | 24 $ hg debugsparse --include 'hide' |
25 $ ls | 25 $ ls -A |
26 .hg | |
26 hide | 27 hide |
27 | 28 |
28 Absolute paths outside the repo should just be rejected | 29 Absolute paths outside the repo should just be rejected |
29 | 30 |
30 #if no-windows | 31 #if no-windows |
75 | 76 |
76 Verify commiting while sparse includes other files | 77 Verify commiting while sparse includes other files |
77 | 78 |
78 $ echo z > hide | 79 $ echo z > hide |
79 $ hg ci -Aqm 'edit hide' | 80 $ hg ci -Aqm 'edit hide' |
80 $ ls | 81 $ ls -A |
82 .hg | |
81 hide | 83 hide |
82 $ hg manifest | 84 $ hg manifest |
83 hide | 85 hide |
84 show | 86 show |
85 | 87 |
86 Verify --reset brings files back | 88 Verify --reset brings files back |
87 | 89 |
88 $ hg debugsparse --reset | 90 $ hg debugsparse --reset |
89 $ ls | 91 $ ls -A |
92 .hg | |
90 hide | 93 hide |
91 show | 94 show |
92 $ cat hide | 95 $ cat hide |
93 z | 96 z |
94 $ cat show | 97 $ cat show |
104 show* | 107 show* |
105 | 108 |
106 Verify update only writes included files | 109 Verify update only writes included files |
107 | 110 |
108 $ hg up -q 0 | 111 $ hg up -q 0 |
109 $ ls | 112 $ ls -A |
113 .hg | |
110 show | 114 show |
111 | 115 |
112 $ hg up -q 1 | 116 $ hg up -q 1 |
113 $ ls | 117 $ ls -A |
118 .hg | |
114 show | 119 show |
115 show2 | 120 show2 |
116 | 121 |
117 Verify status only shows included files | 122 Verify status only shows included files |
118 | 123 |
142 | 147 |
143 Verify deleting sparseness with --force brings back files | 148 Verify deleting sparseness with --force brings back files |
144 | 149 |
145 $ hg debugsparse --delete -f 'show*' | 150 $ hg debugsparse --delete -f 'show*' |
146 pending changes to 'hide' | 151 pending changes to 'hide' |
147 $ ls | 152 $ ls -A |
153 .hg | |
148 hide | 154 hide |
149 hide2 | 155 hide2 |
150 hide3 | 156 hide3 |
151 show | 157 show |
152 show2 | 158 show2 |
164 | 170 |
165 Verify adding sparseness hides files | 171 Verify adding sparseness hides files |
166 | 172 |
167 $ hg debugsparse --exclude -f 'hide*' | 173 $ hg debugsparse --exclude -f 'hide*' |
168 pending changes to 'hide' | 174 pending changes to 'hide' |
169 $ ls | 175 $ ls -A |
176 .hg | |
170 hide | 177 hide |
171 hide3 | 178 hide3 |
172 show | 179 show |
173 show2 | 180 show2 |
174 $ hg st | 181 $ hg st |
175 M show | 182 M show |
176 | 183 |
177 $ hg up -qC . | 184 $ hg up -qC . |
178 TODO: add an option to purge to also purge files outside the sparse config? | 185 TODO: add an option to purge to also purge files outside the sparse config? |
179 $ hg purge --all --config extensions.purge= | 186 $ hg purge --all --config extensions.purge= |
180 $ ls | 187 $ ls -A |
188 .hg | |
181 hide | 189 hide |
182 hide3 | 190 hide3 |
183 show | 191 show |
184 show2 | 192 show2 |
185 For now, manually remove the files | 193 For now, manually remove the files |
214 $ hg rebase --abort --config extensions.rebase= | 222 $ hg rebase --abort --config extensions.rebase= |
215 cleaned up 1 temporarily added file(s) from the sparse checkout | 223 cleaned up 1 temporarily added file(s) from the sparse checkout |
216 rebase aborted | 224 rebase aborted |
217 $ rm hide.orig | 225 $ rm hide.orig |
218 | 226 |
219 $ ls | 227 $ ls -A |
228 .hg | |
220 show | 229 show |
221 show2 | 230 show2 |
222 | 231 |
223 Verify merge fails if merging excluded files | 232 Verify merge fails if merging excluded files |
224 | 233 |