3 c84d8c75 2019-01-02 stsp # Copyright (c) 2019 Stefan Sperling <stsp@openbsd.org>
5 c84d8c75 2019-01-02 stsp # Permission to use, copy, modify, and distribute this software for any
6 c84d8c75 2019-01-02 stsp # purpose with or without fee is hereby granted, provided that the above
7 c84d8c75 2019-01-02 stsp # copyright notice and this permission notice appear in all copies.
9 c84d8c75 2019-01-02 stsp # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 c84d8c75 2019-01-02 stsp # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 c84d8c75 2019-01-02 stsp # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 c84d8c75 2019-01-02 stsp # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 c84d8c75 2019-01-02 stsp # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 c84d8c75 2019-01-02 stsp # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 c84d8c75 2019-01-02 stsp # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 c84d8c75 2019-01-02 stsp . ./common.sh
19 c84d8c75 2019-01-02 stsp function test_update_basic {
20 0fbd721f 2019-01-02 stsp local testroot=`test_init update_basic`
22 3c90ba67 2019-01-02 stsp got checkout $testroot/repo $testroot/wt > /dev/null
24 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
25 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
29 c84d8c75 2019-01-02 stsp echo "modified alpha" > $testroot/repo/alpha
30 c84d8c75 2019-01-02 stsp git_commit $testroot/repo -m "modified alpha"
32 c84d8c75 2019-01-02 stsp echo "U alpha" > $testroot/stdout.expected
33 9c4b8182 2019-01-02 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
34 9c4b8182 2019-01-02 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
35 9c4b8182 2019-01-02 stsp echo >> $testroot/stdout.expected
37 c84d8c75 2019-01-02 stsp (cd $testroot/wt && got update > $testroot/stdout)
39 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
41 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
42 c84d8c75 2019-01-02 stsp diff -u $testroot/stdout.expected $testroot/stdout
43 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
47 c84d8c75 2019-01-02 stsp echo "modified alpha" > $testroot/content.expected
48 52a3df9b 2019-01-06 stsp cat $testroot/wt/alpha > $testroot/content
50 8d301dd9 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
52 693719bc 2019-01-03 stsp if [ "$ret" != "0" ]; then
53 c84d8c75 2019-01-02 stsp diff -u $testroot/content.expected $testroot/content
55 693719bc 2019-01-03 stsp test_done "$testroot" "$ret"
58 3b4d3732 2019-01-02 stsp function test_update_adds_file {
59 3b4d3732 2019-01-02 stsp local testroot=`test_init update_adds_file`
61 3b4d3732 2019-01-02 stsp got checkout $testroot/repo $testroot/wt > /dev/null
63 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
64 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
68 3b4d3732 2019-01-02 stsp echo "new" > $testroot/repo/gamma/new
69 3b4d3732 2019-01-02 stsp (cd $testroot/repo && git add .)
70 3b4d3732 2019-01-02 stsp git_commit $testroot/repo -m "adding a new file"
72 3b4d3732 2019-01-02 stsp echo "A gamma/new" > $testroot/stdout.expected
73 3b4d3732 2019-01-02 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
74 3b4d3732 2019-01-02 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
75 3b4d3732 2019-01-02 stsp echo >> $testroot/stdout.expected
77 3b4d3732 2019-01-02 stsp (cd $testroot/wt && got update > $testroot/stdout)
79 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
81 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
82 3b4d3732 2019-01-02 stsp diff -u $testroot/stdout.expected $testroot/stdout
83 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
87 3b4d3732 2019-01-02 stsp echo "new" >> $testroot/content.expected
88 52a3df9b 2019-01-06 stsp cat $testroot/wt/gamma/new > $testroot/content
90 8d301dd9 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
92 693719bc 2019-01-03 stsp if [ "$ret" != "0" ]; then
93 3b4d3732 2019-01-02 stsp diff -u $testroot/content.expected $testroot/content
95 693719bc 2019-01-03 stsp test_done "$testroot" "$ret"
98 512f0d0e 2019-01-02 stsp function test_update_deletes_file {
99 512f0d0e 2019-01-02 stsp local testroot=`test_init update_deletes_file`
101 512f0d0e 2019-01-02 stsp got checkout $testroot/repo $testroot/wt > /dev/null
103 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
104 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
108 512f0d0e 2019-01-02 stsp (cd $testroot/repo && git_rm $testroot/repo beta)
109 512f0d0e 2019-01-02 stsp git_commit $testroot/repo -m "deleting a file"
111 512f0d0e 2019-01-02 stsp echo "D beta" > $testroot/stdout.expected
112 512f0d0e 2019-01-02 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
113 512f0d0e 2019-01-02 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
114 512f0d0e 2019-01-02 stsp echo >> $testroot/stdout.expected
116 512f0d0e 2019-01-02 stsp (cd $testroot/wt && got update > $testroot/stdout)
118 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
120 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
121 512f0d0e 2019-01-02 stsp diff -u $testroot/stdout.expected $testroot/stdout
122 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
126 512f0d0e 2019-01-02 stsp if [ -e $testroot/wt/beta ]; then
127 512f0d0e 2019-01-02 stsp echo "removed file beta still exists on disk" >&2
128 52a3df9b 2019-01-06 stsp test_done "$testroot" "1"
132 52a3df9b 2019-01-06 stsp test_done "$testroot" "0"
135 f5c49f82 2019-01-06 stsp function test_update_deletes_dir {
136 f5c49f82 2019-01-06 stsp local testroot=`test_init update_deletes_dir`
138 f5c49f82 2019-01-06 stsp got checkout $testroot/repo $testroot/wt > /dev/null
140 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
141 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
145 f5c49f82 2019-01-06 stsp (cd $testroot/repo && git_rm $testroot/repo -r epsilon)
146 f5c49f82 2019-01-06 stsp git_commit $testroot/repo -m "deleting a directory"
148 f5c49f82 2019-01-06 stsp echo "D epsilon/zeta" > $testroot/stdout.expected
149 f5c49f82 2019-01-06 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
150 f5c49f82 2019-01-06 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
151 f5c49f82 2019-01-06 stsp echo >> $testroot/stdout.expected
153 f5c49f82 2019-01-06 stsp (cd $testroot/wt && got update > $testroot/stdout)
155 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
157 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
158 f5c49f82 2019-01-06 stsp diff -u $testroot/stdout.expected $testroot/stdout
159 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
163 f5c49f82 2019-01-06 stsp if [ -e $testroot/wt/epsilon ]; then
164 f5c49f82 2019-01-06 stsp echo "removed dir epsilon still exists on disk" >&2
165 52a3df9b 2019-01-06 stsp test_done "$testroot" "1"
169 52a3df9b 2019-01-06 stsp test_done "$testroot" "0"
172 5cc266ba 2019-01-06 stsp function test_update_deletes_dir_with_path_prefix {
173 5cc266ba 2019-01-06 stsp local testroot=`test_init update_deletes_dir_with_path_prefix`
174 5cc266ba 2019-01-06 stsp local first_rev=`git_show_head $testroot/repo`
176 5cc266ba 2019-01-06 stsp mkdir $testroot/repo/epsilon/psi
177 5cc266ba 2019-01-06 stsp echo mu > $testroot/repo/epsilon/psi/mu
178 5cc266ba 2019-01-06 stsp (cd $testroot/repo && git add .)
179 5cc266ba 2019-01-06 stsp git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
181 5cc266ba 2019-01-06 stsp # check out the epsilon/ sub-tree
182 5cc266ba 2019-01-06 stsp got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
184 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
185 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
189 5cc266ba 2019-01-06 stsp # update back to first commit and expect psi/mu to be deleted
190 5cc266ba 2019-01-06 stsp echo "D psi/mu" > $testroot/stdout.expected
191 5cc266ba 2019-01-06 stsp echo "Updated to commit $first_rev" >> $testroot/stdout.expected
193 5cc266ba 2019-01-06 stsp (cd $testroot/wt && got update -c $first_rev > $testroot/stdout)
195 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
197 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
198 5cc266ba 2019-01-06 stsp diff -u $testroot/stdout.expected $testroot/stdout
199 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
203 5cc266ba 2019-01-06 stsp if [ -e $testroot/wt/psi ]; then
204 5cc266ba 2019-01-06 stsp echo "removed dir psi still exists on disk" >&2
205 5cc266ba 2019-01-06 stsp test_done "$testroot" "1"
209 52a3df9b 2019-01-06 stsp test_done "$testroot" "0"
212 90285c3b 2019-01-08 stsp function test_update_deletes_dir_recursively {
213 90285c3b 2019-01-08 stsp local testroot=`test_init update_deletes_dir_recursively`
214 90285c3b 2019-01-08 stsp local first_rev=`git_show_head $testroot/repo`
216 90285c3b 2019-01-08 stsp mkdir $testroot/repo/epsilon/psi
217 90285c3b 2019-01-08 stsp echo mu > $testroot/repo/epsilon/psi/mu
218 90285c3b 2019-01-08 stsp mkdir $testroot/repo/epsilon/psi/chi
219 90285c3b 2019-01-08 stsp echo tau > $testroot/repo/epsilon/psi/chi/tau
220 90285c3b 2019-01-08 stsp (cd $testroot/repo && git add .)
221 90285c3b 2019-01-08 stsp git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
223 90285c3b 2019-01-08 stsp # check out the epsilon/ sub-tree
224 90285c3b 2019-01-08 stsp got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
226 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
227 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
231 90285c3b 2019-01-08 stsp # update back to first commit and expect psi/mu to be deleted
232 90285c3b 2019-01-08 stsp echo "D psi/chi/tau" > $testroot/stdout.expected
233 90285c3b 2019-01-08 stsp echo "D psi/mu" >> $testroot/stdout.expected
234 90285c3b 2019-01-08 stsp echo "Updated to commit $first_rev" >> $testroot/stdout.expected
236 90285c3b 2019-01-08 stsp (cd $testroot/wt && got update -c $first_rev > $testroot/stdout)
238 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
240 90285c3b 2019-01-08 stsp if [ "$?" != "0" ]; then
241 90285c3b 2019-01-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
242 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
246 90285c3b 2019-01-08 stsp if [ -e $testroot/wt/psi ]; then
247 90285c3b 2019-01-08 stsp echo "removed dir psi still exists on disk" >&2
248 90285c3b 2019-01-08 stsp test_done "$testroot" "1"
252 90285c3b 2019-01-08 stsp test_done "$testroot" "0"
255 4482e97b 2019-01-08 stsp function test_update_sibling_dirs_with_common_prefix {
256 4482e97b 2019-01-08 stsp local testroot=`test_init update_sibling_dirs_with_common_prefix`
258 81a30460 2019-01-08 stsp got checkout $testroot/repo $testroot/wt > /dev/null
260 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
261 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
265 81a30460 2019-01-08 stsp mkdir $testroot/repo/epsilon2
266 81a30460 2019-01-08 stsp echo mu > $testroot/repo/epsilon2/mu
267 81a30460 2019-01-08 stsp (cd $testroot/repo && git add epsilon2/mu)
268 81a30460 2019-01-08 stsp git_commit $testroot/repo -m "adding sibling of epsilon"
269 81a30460 2019-01-08 stsp echo change > $testroot/repo/epsilon/zeta
270 81a30460 2019-01-08 stsp git_commit $testroot/repo -m "changing epsilon/zeta"
272 81a30460 2019-01-08 stsp echo "U epsilon/zeta" > $testroot/stdout.expected
273 81a30460 2019-01-08 stsp echo "A epsilon2/mu" >> $testroot/stdout.expected
274 81a30460 2019-01-08 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
275 81a30460 2019-01-08 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
276 81a30460 2019-01-08 stsp echo >> $testroot/stdout.expected
278 81a30460 2019-01-08 stsp (cd $testroot/wt && got update > $testroot/stdout)
280 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
282 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
283 81a30460 2019-01-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
284 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
288 81a30460 2019-01-08 stsp echo "another change" > $testroot/repo/epsilon/zeta
289 81a30460 2019-01-08 stsp git_commit $testroot/repo -m "changing epsilon/zeta again"
291 81a30460 2019-01-08 stsp echo "U epsilon/zeta" > $testroot/stdout.expected
292 81a30460 2019-01-08 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
293 81a30460 2019-01-08 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
294 81a30460 2019-01-08 stsp echo >> $testroot/stdout.expected
296 81a30460 2019-01-08 stsp # Bug: This update used to do delete/add epsilon2/mu again:
297 81a30460 2019-01-08 stsp # U epsilon/zeta
298 81a30460 2019-01-08 stsp # D epsilon2/mu <--- not intended
299 81a30460 2019-01-08 stsp # A epsilon2/mu <--- not intended
300 50952927 2019-01-12 stsp (cd $testroot/wt && got update > $testroot/stdout)
302 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
304 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
305 50952927 2019-01-12 stsp diff -u $testroot/stdout.expected $testroot/stdout
306 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
310 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
312 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
313 50952927 2019-01-12 stsp diff -u $testroot/stdout.expected $testroot/stdout
315 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
318 50952927 2019-01-12 stsp function test_update_dir_with_dot_sibling {
319 50952927 2019-01-12 stsp local testroot=`test_init update_dir_with_dot_sibling`
321 50952927 2019-01-12 stsp got checkout $testroot/repo $testroot/wt > /dev/null
323 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
324 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
328 50952927 2019-01-12 stsp echo text > $testroot/repo/epsilon.txt
329 50952927 2019-01-12 stsp (cd $testroot/repo && git add epsilon.txt)
330 50952927 2019-01-12 stsp git_commit $testroot/repo -m "adding sibling of epsilon"
331 50952927 2019-01-12 stsp echo change > $testroot/repo/epsilon/zeta
332 50952927 2019-01-12 stsp git_commit $testroot/repo -m "changing epsilon/zeta"
334 f5d3d7af 2019-02-05 stsp echo "U epsilon/zeta" > $testroot/stdout.expected
335 f5d3d7af 2019-02-05 stsp echo "A epsilon.txt" >> $testroot/stdout.expected
336 50952927 2019-01-12 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
337 50952927 2019-01-12 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
338 50952927 2019-01-12 stsp echo >> $testroot/stdout.expected
340 81a30460 2019-01-08 stsp (cd $testroot/wt && got update > $testroot/stdout)
342 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
344 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
345 81a30460 2019-01-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
346 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
350 50952927 2019-01-12 stsp echo "another change" > $testroot/repo/epsilon/zeta
351 50952927 2019-01-12 stsp git_commit $testroot/repo -m "changing epsilon/zeta again"
353 50952927 2019-01-12 stsp echo "U epsilon/zeta" > $testroot/stdout.expected
354 50952927 2019-01-12 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
355 50952927 2019-01-12 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
356 50952927 2019-01-12 stsp echo >> $testroot/stdout.expected
358 50952927 2019-01-12 stsp (cd $testroot/wt && got update > $testroot/stdout)
360 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
362 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
363 81a30460 2019-01-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
364 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
368 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
370 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
371 50952927 2019-01-12 stsp diff -u $testroot/stdout.expected $testroot/stdout
373 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
376 46cee7a3 2019-01-12 stsp function test_update_moves_files_upwards {
377 46cee7a3 2019-01-12 stsp local testroot=`test_init update_moves_files_upwards`
379 46cee7a3 2019-01-12 stsp mkdir $testroot/repo/epsilon/psi
380 46cee7a3 2019-01-12 stsp echo mu > $testroot/repo/epsilon/psi/mu
381 46cee7a3 2019-01-12 stsp mkdir $testroot/repo/epsilon/psi/chi
382 46cee7a3 2019-01-12 stsp echo tau > $testroot/repo/epsilon/psi/chi/tau
383 46cee7a3 2019-01-12 stsp (cd $testroot/repo && git add .)
384 46cee7a3 2019-01-12 stsp git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
386 46cee7a3 2019-01-12 stsp got checkout $testroot/repo $testroot/wt > /dev/null
388 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
389 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
393 46cee7a3 2019-01-12 stsp (cd $testroot/repo && git mv epsilon/psi/mu epsilon/mu)
394 46cee7a3 2019-01-12 stsp (cd $testroot/repo && git mv epsilon/psi/chi/tau epsilon/psi/tau)
395 46cee7a3 2019-01-12 stsp git_commit $testroot/repo -m "moving files upwards"
397 21908da4 2019-01-13 stsp echo "A epsilon/mu" > $testroot/stdout.expected
398 21908da4 2019-01-13 stsp echo "D epsilon/psi/chi/tau" >> $testroot/stdout.expected
399 46cee7a3 2019-01-12 stsp echo "D epsilon/psi/mu" >> $testroot/stdout.expected
400 bd4792ec 2019-01-13 stsp echo "A epsilon/psi/tau" >> $testroot/stdout.expected
401 46cee7a3 2019-01-12 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
402 46cee7a3 2019-01-12 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
403 46cee7a3 2019-01-12 stsp echo >> $testroot/stdout.expected
405 46cee7a3 2019-01-12 stsp (cd $testroot/wt && got update > $testroot/stdout)
407 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
409 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
410 46cee7a3 2019-01-12 stsp diff -u $testroot/stdout.expected $testroot/stdout
411 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
415 46cee7a3 2019-01-12 stsp if [ -e $testroot/wt/epsilon/psi/chi ]; then
416 46cee7a3 2019-01-12 stsp echo "removed dir epsilon/psi/chi still exists on disk" >&2
417 46cee7a3 2019-01-12 stsp test_done "$testroot" "1"
421 46cee7a3 2019-01-12 stsp if [ -e $testroot/wt/epsilon/psi/mu ]; then
422 46cee7a3 2019-01-12 stsp echo "removed file epsilon/psi/mu still exists on disk" >&2
423 46cee7a3 2019-01-12 stsp test_done "$testroot" "1"
427 46cee7a3 2019-01-12 stsp test_done "$testroot" "0"
430 46cee7a3 2019-01-12 stsp function test_update_moves_files_to_new_dir {
431 46cee7a3 2019-01-12 stsp local testroot=`test_init update_moves_files_to_new_dir`
433 46cee7a3 2019-01-12 stsp mkdir $testroot/repo/epsilon/psi
434 46cee7a3 2019-01-12 stsp echo mu > $testroot/repo/epsilon/psi/mu
435 46cee7a3 2019-01-12 stsp mkdir $testroot/repo/epsilon/psi/chi
436 46cee7a3 2019-01-12 stsp echo tau > $testroot/repo/epsilon/psi/chi/tau
437 46cee7a3 2019-01-12 stsp (cd $testroot/repo && git add .)
438 46cee7a3 2019-01-12 stsp git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
440 46cee7a3 2019-01-12 stsp got checkout $testroot/repo $testroot/wt > /dev/null
442 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
443 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
447 46cee7a3 2019-01-12 stsp mkdir -p $testroot/repo/epsilon-new/psi
448 46cee7a3 2019-01-12 stsp (cd $testroot/repo && git mv epsilon/psi/mu epsilon-new/mu)
449 46cee7a3 2019-01-12 stsp (cd $testroot/repo && git mv epsilon/psi/chi/tau epsilon-new/psi/tau)
450 46cee7a3 2019-01-12 stsp git_commit $testroot/repo -m "moving files upwards"
452 f5d3d7af 2019-02-05 stsp echo "D epsilon/psi/chi/tau" > $testroot/stdout.expected
453 46cee7a3 2019-01-12 stsp echo "D epsilon/psi/mu" >> $testroot/stdout.expected
454 f5d3d7af 2019-02-05 stsp echo "A epsilon-new/mu" >> $testroot/stdout.expected
455 f5d3d7af 2019-02-05 stsp echo "A epsilon-new/psi/tau" >> $testroot/stdout.expected
456 46cee7a3 2019-01-12 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
457 46cee7a3 2019-01-12 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
458 46cee7a3 2019-01-12 stsp echo >> $testroot/stdout.expected
460 46cee7a3 2019-01-12 stsp (cd $testroot/wt && got update > $testroot/stdout)
462 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
464 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
465 46cee7a3 2019-01-12 stsp diff -u $testroot/stdout.expected $testroot/stdout
466 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
470 46cee7a3 2019-01-12 stsp if [ -e $testroot/wt/epsilon/psi/chi ]; then
471 46cee7a3 2019-01-12 stsp echo "removed dir epsilon/psi/chi still exists on disk" >&2
472 46cee7a3 2019-01-12 stsp test_done "$testroot" "1"
476 46cee7a3 2019-01-12 stsp if [ -e $testroot/wt/epsilon/psi/mu ]; then
477 46cee7a3 2019-01-12 stsp echo "removed file epsilon/psi/mu still exists on disk" >&2
478 46cee7a3 2019-01-12 stsp test_done "$testroot" "1"
482 4a1ddfc2 2019-01-12 stsp test_done "$testroot" "0"
485 4a1ddfc2 2019-01-12 stsp function test_update_creates_missing_parent {
486 1aad446a 2019-01-13 stsp local testroot=`test_init update_creates_missing_parent 1`
488 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/Makefile
489 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/snake.6
490 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/snake.c
491 4a1ddfc2 2019-01-12 stsp (cd $testroot/repo && git add .)
492 4a1ddfc2 2019-01-12 stsp git_commit $testroot/repo -m "adding initial snake tree"
494 4a1ddfc2 2019-01-12 stsp got checkout $testroot/repo $testroot/wt > /dev/null
496 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
497 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
501 4a1ddfc2 2019-01-12 stsp mkdir -p $testroot/repo/snake
502 4a1ddfc2 2019-01-12 stsp (cd $testroot/repo && git mv Makefile snake.6 snake.c snake)
503 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/snake/move.c
504 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/snake/pathnames.h
505 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/snake/snake.h
506 4a1ddfc2 2019-01-12 stsp mkdir -p $testroot/repo/snscore
507 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/snscore/Makefile
508 4a1ddfc2 2019-01-12 stsp touch $testroot/repo/snscore/snscore.c
509 4a1ddfc2 2019-01-12 stsp (cd $testroot/repo && git add .)
510 4a1ddfc2 2019-01-12 stsp git_commit $testroot/repo -m "restructuring snake tree"
512 4a1ddfc2 2019-01-12 stsp echo "D Makefile" > $testroot/stdout.expected
513 4a1ddfc2 2019-01-12 stsp echo "A snake/Makefile" >> $testroot/stdout.expected
514 4a1ddfc2 2019-01-12 stsp echo "A snake/move.c" >> $testroot/stdout.expected
515 4a1ddfc2 2019-01-12 stsp echo "A snake/pathnames.h" >> $testroot/stdout.expected
516 4a1ddfc2 2019-01-12 stsp echo "A snake/snake.6" >> $testroot/stdout.expected
517 4a1ddfc2 2019-01-12 stsp echo "A snake/snake.c" >> $testroot/stdout.expected
518 4a1ddfc2 2019-01-12 stsp echo "A snake/snake.h" >> $testroot/stdout.expected
519 18831e78 2019-02-10 stsp echo "D snake.6" >> $testroot/stdout.expected
520 18831e78 2019-02-10 stsp echo "D snake.c" >> $testroot/stdout.expected
521 bd4792ec 2019-01-13 stsp echo "A snscore/Makefile" >> $testroot/stdout.expected
522 bd4792ec 2019-01-13 stsp echo "A snscore/snscore.c" >> $testroot/stdout.expected
523 bd4792ec 2019-01-13 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
524 bd4792ec 2019-01-13 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
525 bd4792ec 2019-01-13 stsp echo >> $testroot/stdout.expected
527 bd4792ec 2019-01-13 stsp (cd $testroot/wt && got update > $testroot/stdout)
529 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
531 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
532 e60e7f5b 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
534 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
537 bd4792ec 2019-01-13 stsp function test_update_creates_missing_parent_with_subdir {
538 1aad446a 2019-01-13 stsp local testroot=`test_init update_creates_missing_parent_with_subdir 1`
540 bd4792ec 2019-01-13 stsp touch $testroot/repo/Makefile
541 bd4792ec 2019-01-13 stsp touch $testroot/repo/snake.6
542 bd4792ec 2019-01-13 stsp touch $testroot/repo/snake.c
543 bd4792ec 2019-01-13 stsp (cd $testroot/repo && git add .)
544 bd4792ec 2019-01-13 stsp git_commit $testroot/repo -m "adding initial snake tree"
546 bd4792ec 2019-01-13 stsp got checkout $testroot/repo $testroot/wt > /dev/null
548 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
549 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
553 bd4792ec 2019-01-13 stsp mkdir -p $testroot/repo/sss/snake
554 bd4792ec 2019-01-13 stsp (cd $testroot/repo && git mv Makefile snake.6 snake.c sss/snake)
555 bd4792ec 2019-01-13 stsp touch $testroot/repo/sss/snake/move.c
556 bd4792ec 2019-01-13 stsp touch $testroot/repo/sss/snake/pathnames.h
557 bd4792ec 2019-01-13 stsp touch $testroot/repo/sss/snake/snake.h
558 bd4792ec 2019-01-13 stsp mkdir -p $testroot/repo/snscore
559 bd4792ec 2019-01-13 stsp touch $testroot/repo/snscore/Makefile
560 bd4792ec 2019-01-13 stsp touch $testroot/repo/snscore/snscore.c
561 bd4792ec 2019-01-13 stsp (cd $testroot/repo && git add .)
562 bd4792ec 2019-01-13 stsp git_commit $testroot/repo -m "restructuring snake tree"
564 bd4792ec 2019-01-13 stsp echo "D Makefile" > $testroot/stdout.expected
565 4a1ddfc2 2019-01-12 stsp echo "D snake.6" >> $testroot/stdout.expected
566 4a1ddfc2 2019-01-12 stsp echo "D snake.c" >> $testroot/stdout.expected
567 4a1ddfc2 2019-01-12 stsp echo "A snscore/Makefile" >> $testroot/stdout.expected
568 4a1ddfc2 2019-01-12 stsp echo "A snscore/snscore.c" >> $testroot/stdout.expected
569 bd4792ec 2019-01-13 stsp echo "A sss/snake/Makefile" >> $testroot/stdout.expected
570 bd4792ec 2019-01-13 stsp echo "A sss/snake/move.c" >> $testroot/stdout.expected
571 bd4792ec 2019-01-13 stsp echo "A sss/snake/pathnames.h" >> $testroot/stdout.expected
572 bd4792ec 2019-01-13 stsp echo "A sss/snake/snake.6" >> $testroot/stdout.expected
573 bd4792ec 2019-01-13 stsp echo "A sss/snake/snake.c" >> $testroot/stdout.expected
574 bd4792ec 2019-01-13 stsp echo "A sss/snake/snake.h" >> $testroot/stdout.expected
575 4a1ddfc2 2019-01-12 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
576 4a1ddfc2 2019-01-12 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
577 4a1ddfc2 2019-01-12 stsp echo >> $testroot/stdout.expected
579 4a1ddfc2 2019-01-12 stsp (cd $testroot/wt && got update > $testroot/stdout)
581 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
583 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
584 4a1ddfc2 2019-01-12 stsp diff -u $testroot/stdout.expected $testroot/stdout
585 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
589 46cee7a3 2019-01-12 stsp test_done "$testroot" "0"
592 21908da4 2019-01-13 stsp function test_update_file_in_subsubdir {
593 1aad446a 2019-01-13 stsp local testroot=`test_init update_fle_in_subsubdir 1`
595 21908da4 2019-01-13 stsp touch $testroot/repo/Makefile
596 21908da4 2019-01-13 stsp mkdir -p $testroot/repo/altq
597 21908da4 2019-01-13 stsp touch $testroot/repo/altq/if_altq.h
598 21908da4 2019-01-13 stsp mkdir -p $testroot/repo/arch/alpha
599 21908da4 2019-01-13 stsp touch $testroot/repo/arch/alpha/Makefile
600 21908da4 2019-01-13 stsp (cd $testroot/repo && git add .)
601 21908da4 2019-01-13 stsp git_commit $testroot/repo -m "adding initial tree"
603 21908da4 2019-01-13 stsp got checkout $testroot/repo $testroot/wt > /dev/null
605 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
606 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
610 21908da4 2019-01-13 stsp echo change > $testroot/repo/arch/alpha/Makefile
611 21908da4 2019-01-13 stsp (cd $testroot/repo && git add .)
612 21908da4 2019-01-13 stsp git_commit $testroot/repo -m "changed a file"
614 21908da4 2019-01-13 stsp echo "U arch/alpha/Makefile" > $testroot/stdout.expected
615 21908da4 2019-01-13 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
616 21908da4 2019-01-13 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
617 21908da4 2019-01-13 stsp echo >> $testroot/stdout.expected
619 21908da4 2019-01-13 stsp (cd $testroot/wt && got update > $testroot/stdout)
621 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
623 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
624 21908da4 2019-01-13 stsp diff -u $testroot/stdout.expected $testroot/stdout
625 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
629 21908da4 2019-01-13 stsp test_done "$testroot" "0"
632 6353ad76 2019-02-08 stsp function test_update_merges_file_edits {
633 6353ad76 2019-02-08 stsp local testroot=`test_init update_merges_file_edits`
635 6353ad76 2019-02-08 stsp echo "1" > $testroot/repo/numbers
636 6353ad76 2019-02-08 stsp echo "2" >> $testroot/repo/numbers
637 6353ad76 2019-02-08 stsp echo "3" >> $testroot/repo/numbers
638 6353ad76 2019-02-08 stsp echo "4" >> $testroot/repo/numbers
639 6353ad76 2019-02-08 stsp echo "5" >> $testroot/repo/numbers
640 6353ad76 2019-02-08 stsp echo "6" >> $testroot/repo/numbers
641 6353ad76 2019-02-08 stsp echo "7" >> $testroot/repo/numbers
642 6353ad76 2019-02-08 stsp echo "8" >> $testroot/repo/numbers
643 6353ad76 2019-02-08 stsp (cd $testroot/repo && git add numbers)
644 6353ad76 2019-02-08 stsp git_commit $testroot/repo -m "added numbers file"
646 6353ad76 2019-02-08 stsp got checkout $testroot/repo $testroot/wt > /dev/null
648 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
649 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
653 6353ad76 2019-02-08 stsp echo "modified alpha" > $testroot/repo/alpha
654 6353ad76 2019-02-08 stsp echo "modified beta" > $testroot/repo/beta
655 6353ad76 2019-02-08 stsp sed -i 's/2/22/' $testroot/repo/numbers
656 6353ad76 2019-02-08 stsp git_commit $testroot/repo -m "modified 3 files"
658 6353ad76 2019-02-08 stsp echo "modified alpha, too" > $testroot/wt/alpha
659 6353ad76 2019-02-08 stsp touch $testroot/wt/beta
660 6353ad76 2019-02-08 stsp sed -i 's/7/77/' $testroot/wt/numbers
662 6353ad76 2019-02-08 stsp echo "C alpha" > $testroot/stdout.expected
663 6353ad76 2019-02-08 stsp echo "U beta" >> $testroot/stdout.expected
664 6353ad76 2019-02-08 stsp echo "G numbers" >> $testroot/stdout.expected
665 6353ad76 2019-02-08 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
666 6353ad76 2019-02-08 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
667 6353ad76 2019-02-08 stsp echo >> $testroot/stdout.expected
669 6353ad76 2019-02-08 stsp (cd $testroot/wt && got update > $testroot/stdout)
671 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
673 e60e7f5b 2019-02-10 stsp if [ "$ret" != "0" ]; then
674 6353ad76 2019-02-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
675 e60e7f5b 2019-02-10 stsp test_done "$testroot" "$ret"
679 6353ad76 2019-02-08 stsp echo -n "<<<<<<< commit " > $testroot/content.expected
680 6353ad76 2019-02-08 stsp git_show_head $testroot/repo >> $testroot/content.expected
681 6353ad76 2019-02-08 stsp echo >> $testroot/content.expected
682 6353ad76 2019-02-08 stsp echo "modified alpha" >> $testroot/content.expected
683 d136cfcb 2019-10-12 stsp echo "|||||||" >> $testroot/content.expected
684 d136cfcb 2019-10-12 stsp echo "alpha" >> $testroot/content.expected
685 6353ad76 2019-02-08 stsp echo "=======" >> $testroot/content.expected
686 6353ad76 2019-02-08 stsp echo "modified alpha, too" >> $testroot/content.expected
687 6353ad76 2019-02-08 stsp echo '>>>>>>> alpha' >> $testroot/content.expected
688 6353ad76 2019-02-08 stsp echo "modified beta" >> $testroot/content.expected
689 6353ad76 2019-02-08 stsp echo "1" >> $testroot/content.expected
690 6353ad76 2019-02-08 stsp echo "22" >> $testroot/content.expected
691 6353ad76 2019-02-08 stsp echo "3" >> $testroot/content.expected
692 6353ad76 2019-02-08 stsp echo "4" >> $testroot/content.expected
693 6353ad76 2019-02-08 stsp echo "5" >> $testroot/content.expected
694 6353ad76 2019-02-08 stsp echo "6" >> $testroot/content.expected
695 6353ad76 2019-02-08 stsp echo "77" >> $testroot/content.expected
696 6353ad76 2019-02-08 stsp echo "8" >> $testroot/content.expected
698 6353ad76 2019-02-08 stsp cat $testroot/wt/alpha > $testroot/content
699 6353ad76 2019-02-08 stsp cat $testroot/wt/beta >> $testroot/content
700 6353ad76 2019-02-08 stsp cat $testroot/wt/numbers >> $testroot/content
702 8d301dd9 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
704 6353ad76 2019-02-08 stsp if [ "$ret" != "0" ]; then
705 6353ad76 2019-02-08 stsp diff -u $testroot/content.expected $testroot/content
707 68ed9ba5 2019-02-10 stsp test_done "$testroot" "$ret"
710 68ed9ba5 2019-02-10 stsp function test_update_keeps_xbit {
711 68ed9ba5 2019-02-10 stsp local testroot=`test_init update_keeps_xbit 1`
713 68ed9ba5 2019-02-10 stsp touch $testroot/repo/xfile
714 68ed9ba5 2019-02-10 stsp chmod +x $testroot/repo/xfile
715 68ed9ba5 2019-02-10 stsp (cd $testroot/repo && git add .)
716 68ed9ba5 2019-02-10 stsp git_commit $testroot/repo -m "adding executable file"
718 68ed9ba5 2019-02-10 stsp got checkout $testroot/repo $testroot/wt > $testroot/stdout
720 68ed9ba5 2019-02-10 stsp if [ "$ret" != "0" ]; then
721 68ed9ba5 2019-02-10 stsp test_done "$testroot" "$ret"
725 68ed9ba5 2019-02-10 stsp echo foo > $testroot/repo/xfile
726 68ed9ba5 2019-02-10 stsp git_commit $testroot/repo -m "changed executable file"
728 68ed9ba5 2019-02-10 stsp echo "U xfile" > $testroot/stdout.expected
729 68ed9ba5 2019-02-10 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
730 68ed9ba5 2019-02-10 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
731 68ed9ba5 2019-02-10 stsp echo >> $testroot/stdout.expected
733 68ed9ba5 2019-02-10 stsp (cd $testroot/wt && got update > $testroot/stdout)
735 68ed9ba5 2019-02-10 stsp if [ "$ret" != "0" ]; then
736 68ed9ba5 2019-02-10 stsp test_done "$testroot" "$ret"
740 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
742 68ed9ba5 2019-02-10 stsp if [ "$ret" != "0" ]; then
743 68ed9ba5 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
744 68ed9ba5 2019-02-10 stsp test_done "$testroot" "$ret"
748 68ed9ba5 2019-02-10 stsp ls -l $testroot/wt/xfile | grep -q '^-rwx'
750 68ed9ba5 2019-02-10 stsp if [ "$ret" != "0" ]; then
751 68ed9ba5 2019-02-10 stsp echo "file is not executable" >&2
752 68ed9ba5 2019-02-10 stsp ls -l $testroot/wt/xfile >&2
754 6353ad76 2019-02-08 stsp test_done "$testroot" "$ret"
757 ba8a0d4d 2019-02-10 stsp function test_update_clears_xbit {
758 ba8a0d4d 2019-02-10 stsp local testroot=`test_init update_clears_xbit 1`
760 ba8a0d4d 2019-02-10 stsp touch $testroot/repo/xfile
761 ba8a0d4d 2019-02-10 stsp chmod +x $testroot/repo/xfile
762 ba8a0d4d 2019-02-10 stsp (cd $testroot/repo && git add .)
763 ba8a0d4d 2019-02-10 stsp git_commit $testroot/repo -m "adding executable file"
765 ba8a0d4d 2019-02-10 stsp got checkout $testroot/repo $testroot/wt > $testroot/stdout
767 ba8a0d4d 2019-02-10 stsp if [ "$ret" != "0" ]; then
768 ba8a0d4d 2019-02-10 stsp test_done "$testroot" "$ret"
772 ba8a0d4d 2019-02-10 stsp ls -l $testroot/wt/xfile | grep -q '^-rwx'
774 ba8a0d4d 2019-02-10 stsp if [ "$ret" != "0" ]; then
775 ba8a0d4d 2019-02-10 stsp echo "file is not executable" >&2
776 ba8a0d4d 2019-02-10 stsp ls -l $testroot/wt/xfile >&2
777 ba8a0d4d 2019-02-10 stsp test_done "$testroot" "$ret"
781 ba8a0d4d 2019-02-10 stsp # XXX git seems to require a file edit when flipping the x bit?
782 ba8a0d4d 2019-02-10 stsp echo foo > $testroot/repo/xfile
783 ba8a0d4d 2019-02-10 stsp chmod -x $testroot/repo/xfile
784 ba8a0d4d 2019-02-10 stsp git_commit $testroot/repo -m "not an executable file anymore"
786 ba8a0d4d 2019-02-10 stsp echo "U xfile" > $testroot/stdout.expected
787 ba8a0d4d 2019-02-10 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
788 ba8a0d4d 2019-02-10 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
789 ba8a0d4d 2019-02-10 stsp echo >> $testroot/stdout.expected
791 ba8a0d4d 2019-02-10 stsp (cd $testroot/wt && got update > $testroot/stdout)
793 ba8a0d4d 2019-02-10 stsp if [ "$ret" != "0" ]; then
794 ba8a0d4d 2019-02-10 stsp test_done "$testroot" "$ret"
798 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
800 ba8a0d4d 2019-02-10 stsp if [ "$ret" != "0" ]; then
801 ba8a0d4d 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
802 ba8a0d4d 2019-02-10 stsp test_done "$testroot" "$ret"
806 ba8a0d4d 2019-02-10 stsp ls -l $testroot/wt/xfile | grep -q '^-rw-'
808 ba8a0d4d 2019-02-10 stsp if [ "$ret" != "0" ]; then
809 ba8a0d4d 2019-02-10 stsp echo "file is unexpectedly executable" >&2
810 ba8a0d4d 2019-02-10 stsp ls -l $testroot/wt/xfile >&2
812 ba8a0d4d 2019-02-10 stsp test_done "$testroot" "$ret"
815 a378724f 2019-02-10 stsp function test_update_restores_missing_file {
816 a378724f 2019-02-10 stsp local testroot=`test_init update_restores_missing_file`
818 a378724f 2019-02-10 stsp got checkout $testroot/repo $testroot/wt > /dev/null
820 a378724f 2019-02-10 stsp if [ "$ret" != "0" ]; then
821 a378724f 2019-02-10 stsp test_done "$testroot" "$ret"
825 a378724f 2019-02-10 stsp rm $testroot/wt/alpha
827 a378724f 2019-02-10 stsp echo "! alpha" > $testroot/stdout.expected
828 1545c615 2019-02-10 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
829 1545c615 2019-02-10 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
830 1545c615 2019-02-10 stsp echo >> $testroot/stdout.expected
831 a378724f 2019-02-10 stsp (cd $testroot/wt && got update > $testroot/stdout)
833 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
835 a378724f 2019-02-10 stsp if [ "$ret" != "0" ]; then
836 a378724f 2019-02-10 stsp diff -u $testroot/stdout.expected $testroot/stdout
837 a378724f 2019-02-10 stsp test_done "$testroot" "$ret"
841 a378724f 2019-02-10 stsp echo "alpha" > $testroot/content.expected
843 a378724f 2019-02-10 stsp cat $testroot/wt/alpha > $testroot/content
845 8d301dd9 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
847 1430b4e0 2019-03-27 stsp if [ "$ret" != "0" ]; then
848 1430b4e0 2019-03-27 stsp diff -u $testroot/content.expected $testroot/content
850 1430b4e0 2019-03-27 stsp test_done "$testroot" "$ret"
853 085d5bcf 2019-03-27 stsp function test_update_conflict_wt_add_vs_repo_add {
854 085d5bcf 2019-03-27 stsp local testroot=`test_init update_conflict_wt_add_vs_repo_add`
856 1430b4e0 2019-03-27 stsp got checkout $testroot/repo $testroot/wt > /dev/null
858 1430b4e0 2019-03-27 stsp if [ "$ret" != "0" ]; then
859 1430b4e0 2019-03-27 stsp test_done "$testroot" "$ret"
863 1430b4e0 2019-03-27 stsp echo "new" > $testroot/repo/gamma/new
864 1430b4e0 2019-03-27 stsp (cd $testroot/repo && git add .)
865 1430b4e0 2019-03-27 stsp git_commit $testroot/repo -m "adding a new file"
867 1430b4e0 2019-03-27 stsp echo "also new" > $testroot/wt/gamma/new
868 1430b4e0 2019-03-27 stsp (cd $testroot/wt && got add gamma/new >/dev/null)
870 1430b4e0 2019-03-27 stsp (cd $testroot/wt && got update > $testroot/stdout)
872 1430b4e0 2019-03-27 stsp echo "C gamma/new" > $testroot/stdout.expected
873 1430b4e0 2019-03-27 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
874 1430b4e0 2019-03-27 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
875 1430b4e0 2019-03-27 stsp echo >> $testroot/stdout.expected
876 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
878 1430b4e0 2019-03-27 stsp if [ "$ret" != "0" ]; then
879 1430b4e0 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
880 1430b4e0 2019-03-27 stsp test_done "$testroot" "$ret"
884 1430b4e0 2019-03-27 stsp echo -n "<<<<<<< commit " > $testroot/content.expected
885 1430b4e0 2019-03-27 stsp git_show_head $testroot/repo >> $testroot/content.expected
886 1430b4e0 2019-03-27 stsp echo >> $testroot/content.expected
887 1430b4e0 2019-03-27 stsp echo "new" >> $testroot/content.expected
888 1430b4e0 2019-03-27 stsp echo "=======" >> $testroot/content.expected
889 1430b4e0 2019-03-27 stsp echo "also new" >> $testroot/content.expected
890 1430b4e0 2019-03-27 stsp echo '>>>>>>> gamma/new' >> $testroot/content.expected
892 1430b4e0 2019-03-27 stsp cat $testroot/wt/gamma/new > $testroot/content
894 8d301dd9 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
896 a378724f 2019-02-10 stsp if [ "$ret" != "0" ]; then
897 a378724f 2019-02-10 stsp diff -u $testroot/content.expected $testroot/content
898 3165301c 2019-03-27 stsp test_done "$testroot" "$ret"
902 3165301c 2019-03-27 stsp # resolve the conflict
903 3165301c 2019-03-27 stsp echo "new and also new" > $testroot/wt/gamma/new
904 3165301c 2019-03-27 stsp echo 'M gamma/new' > $testroot/stdout.expected
905 3165301c 2019-03-27 stsp (cd $testroot/wt && got status > $testroot/stdout)
906 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
908 3165301c 2019-03-27 stsp if [ "$ret" != "0" ]; then
909 3165301c 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
911 a378724f 2019-02-10 stsp test_done "$testroot" "$ret"
914 085d5bcf 2019-03-27 stsp function test_update_conflict_wt_edit_vs_repo_rm {
915 085d5bcf 2019-03-27 stsp local testroot=`test_init update_conflict_wt_edit_vs_repo_rm`
917 708d8e67 2019-03-27 stsp got checkout $testroot/repo $testroot/wt > /dev/null
919 708d8e67 2019-03-27 stsp if [ "$ret" != "0" ]; then
920 708d8e67 2019-03-27 stsp test_done "$testroot" "$ret"
924 708d8e67 2019-03-27 stsp (cd $testroot/repo && git rm -q beta)
925 708d8e67 2019-03-27 stsp git_commit $testroot/repo -m "removing a file"
927 708d8e67 2019-03-27 stsp echo "modified beta" > $testroot/wt/beta
929 708d8e67 2019-03-27 stsp (cd $testroot/wt && got update > $testroot/stdout)
931 fc6346c4 2019-03-27 stsp echo "G beta" > $testroot/stdout.expected
932 708d8e67 2019-03-27 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
933 708d8e67 2019-03-27 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
934 708d8e67 2019-03-27 stsp echo >> $testroot/stdout.expected
935 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
937 708d8e67 2019-03-27 stsp if [ "$ret" != "0" ]; then
938 708d8e67 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
939 708d8e67 2019-03-27 stsp test_done "$testroot" "$ret"
943 708d8e67 2019-03-27 stsp echo "modified beta" > $testroot/content.expected
945 708d8e67 2019-03-27 stsp cat $testroot/wt/beta > $testroot/content
947 8d301dd9 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
949 708d8e67 2019-03-27 stsp if [ "$ret" != "0" ]; then
950 708d8e67 2019-03-27 stsp diff -u $testroot/content.expected $testroot/content
951 708d8e67 2019-03-27 stsp test_done "$testroot" "$ret"
955 fc6346c4 2019-03-27 stsp # beta is now an added file... we don't flag tree conflicts yet
956 fc6346c4 2019-03-27 stsp echo 'A beta' > $testroot/stdout.expected
957 13d9040b 2019-03-27 stsp (cd $testroot/wt && got status > $testroot/stdout)
958 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
960 13d9040b 2019-03-27 stsp if [ "$ret" != "0" ]; then
961 13d9040b 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
963 13d9040b 2019-03-27 stsp test_done "$testroot" "$ret"
966 13d9040b 2019-03-27 stsp function test_update_conflict_wt_rm_vs_repo_edit {
967 13d9040b 2019-03-27 stsp local testroot=`test_init update_conflict_wt_rm_vs_repo_edit`
969 13d9040b 2019-03-27 stsp got checkout $testroot/repo $testroot/wt > /dev/null
971 13d9040b 2019-03-27 stsp if [ "$ret" != "0" ]; then
972 13d9040b 2019-03-27 stsp test_done "$testroot" "$ret"
976 13d9040b 2019-03-27 stsp echo "modified beta" > $testroot/repo/beta
977 13d9040b 2019-03-27 stsp git_commit $testroot/repo -m "modified a file"
979 13d9040b 2019-03-27 stsp (cd $testroot/wt && got rm beta > /dev/null)
981 13d9040b 2019-03-27 stsp (cd $testroot/wt && got update > $testroot/stdout)
983 13d9040b 2019-03-27 stsp echo "G beta" > $testroot/stdout.expected
984 13d9040b 2019-03-27 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
985 13d9040b 2019-03-27 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
986 13d9040b 2019-03-27 stsp echo >> $testroot/stdout.expected
987 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
989 13d9040b 2019-03-27 stsp if [ "$ret" != "0" ]; then
990 13d9040b 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
991 13d9040b 2019-03-27 stsp test_done "$testroot" "$ret"
995 13d9040b 2019-03-27 stsp # beta remains a deleted file... we don't flag tree conflicts yet
996 13d9040b 2019-03-27 stsp echo 'D beta' > $testroot/stdout.expected
997 708d8e67 2019-03-27 stsp (cd $testroot/wt && got status > $testroot/stdout)
998 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1000 708d8e67 2019-03-27 stsp if [ "$ret" != "0" ]; then
1001 708d8e67 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
1002 13d9040b 2019-03-27 stsp test_done "$testroot" "$ret"
1006 13d9040b 2019-03-27 stsp # 'got diff' should show post-update contents of beta being deleted
1007 13d9040b 2019-03-27 stsp local head_rev=`git_show_head $testroot/repo`
1008 13d9040b 2019-03-27 stsp echo "diff $head_rev $testroot/wt" > $testroot/stdout.expected
1009 13d9040b 2019-03-27 stsp echo -n 'blob - ' >> $testroot/stdout.expected
1010 13d9040b 2019-03-27 stsp got tree -r $testroot/repo -i | grep 'beta$' | cut -d' ' -f 1 \
1011 13d9040b 2019-03-27 stsp >> $testroot/stdout.expected
1012 13d9040b 2019-03-27 stsp echo 'file + /dev/null' >> $testroot/stdout.expected
1013 13d9040b 2019-03-27 stsp echo '--- beta' >> $testroot/stdout.expected
1014 13d9040b 2019-03-27 stsp echo '+++ beta' >> $testroot/stdout.expected
1015 13d9040b 2019-03-27 stsp echo '@@ -1 +0,0 @@' >> $testroot/stdout.expected
1016 13d9040b 2019-03-27 stsp echo '-modified beta' >> $testroot/stdout.expected
1018 13d9040b 2019-03-27 stsp (cd $testroot/wt && got diff > $testroot/stdout)
1019 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1021 13d9040b 2019-03-27 stsp if [ "$ret" != "0" ]; then
1022 13d9040b 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
1024 708d8e67 2019-03-27 stsp test_done "$testroot" "$ret"
1027 66b11bf5 2019-03-27 stsp function test_update_conflict_wt_rm_vs_repo_rm {
1028 66b11bf5 2019-03-27 stsp local testroot=`test_init update_conflict_wt_rm_vs_repo_rm`
1030 66b11bf5 2019-03-27 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1032 66b11bf5 2019-03-27 stsp if [ "$ret" != "0" ]; then
1033 66b11bf5 2019-03-27 stsp test_done "$testroot" "$ret"
1037 66b11bf5 2019-03-27 stsp (cd $testroot/repo && git rm -q beta)
1038 66b11bf5 2019-03-27 stsp git_commit $testroot/repo -m "removing a file"
1040 66b11bf5 2019-03-27 stsp (cd $testroot/wt && got rm beta > /dev/null)
1042 66b11bf5 2019-03-27 stsp (cd $testroot/wt && got update > $testroot/stdout)
1044 66b11bf5 2019-03-27 stsp echo "D beta" > $testroot/stdout.expected
1045 66b11bf5 2019-03-27 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1046 66b11bf5 2019-03-27 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1047 66b11bf5 2019-03-27 stsp echo >> $testroot/stdout.expected
1048 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1050 66b11bf5 2019-03-27 stsp if [ "$ret" != "0" ]; then
1051 66b11bf5 2019-03-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
1052 66b11bf5 2019-03-27 stsp test_done "$testroot" "$ret"
1056 66b11bf5 2019-03-27 stsp # beta is now gone... we don't flag tree conflicts yet
1057 2a06fe5f 2019-08-24 stsp echo "N beta" > $testroot/stdout.expected
1058 54817d72 2019-07-27 stsp echo -n > $testroot/stderr.expected
1059 54817d72 2019-07-27 stsp (cd $testroot/wt && got status beta > $testroot/stdout \
1060 54817d72 2019-07-27 stsp 2> $testroot/stderr)
1061 54817d72 2019-07-27 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1063 54817d72 2019-07-27 stsp if [ "$ret" != "0" ]; then
1064 54817d72 2019-07-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
1065 54817d72 2019-07-27 stsp test_done "$testroot" "$ret"
1068 8d301dd9 2019-05-14 stsp cmp -s $testroot/stderr.expected $testroot/stderr
1070 66b11bf5 2019-03-27 stsp if [ "$ret" != "0" ]; then
1071 66b11bf5 2019-03-27 stsp diff -u $testroot/stderr.expected $testroot/stderr
1072 66b11bf5 2019-03-27 stsp test_done "$testroot" "$ret"
1076 66b11bf5 2019-03-27 stsp if [ -e $testroot/wt/beta ]; then
1077 66b11bf5 2019-03-27 stsp echo "removed file beta still exists on disk" >&2
1078 66b11bf5 2019-03-27 stsp test_done "$testroot" "1"
1082 66b11bf5 2019-03-27 stsp test_done "$testroot" "0"
1085 c4cdcb68 2019-04-03 stsp function test_update_partial {
1086 c4cdcb68 2019-04-03 stsp local testroot=`test_init update_partial`
1088 c4cdcb68 2019-04-03 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1090 c4cdcb68 2019-04-03 stsp if [ "$ret" != "0" ]; then
1091 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1095 c4cdcb68 2019-04-03 stsp echo "modified alpha" > $testroot/repo/alpha
1096 c4cdcb68 2019-04-03 stsp echo "modified beta" > $testroot/repo/beta
1097 c4cdcb68 2019-04-03 stsp echo "modified epsilon/zeta" > $testroot/repo/epsilon/zeta
1098 c4cdcb68 2019-04-03 stsp git_commit $testroot/repo -m "modified two files"
1100 f2ea84fa 2019-07-27 stsp echo "U alpha" > $testroot/stdout.expected
1101 f2ea84fa 2019-07-27 stsp echo "U beta" >> $testroot/stdout.expected
1102 f2ea84fa 2019-07-27 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1103 f2ea84fa 2019-07-27 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1104 f2ea84fa 2019-07-27 stsp echo >> $testroot/stdout.expected
1106 f2ea84fa 2019-07-27 stsp (cd $testroot/wt && got update alpha beta > $testroot/stdout)
1108 f2ea84fa 2019-07-27 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1110 f2ea84fa 2019-07-27 stsp if [ "$ret" != "0" ]; then
1111 f2ea84fa 2019-07-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
1112 f2ea84fa 2019-07-27 stsp test_done "$testroot" "$ret"
1116 f2ea84fa 2019-07-27 stsp echo "modified alpha" > $testroot/content.expected
1117 f2ea84fa 2019-07-27 stsp echo "modified beta" >> $testroot/content.expected
1119 f2ea84fa 2019-07-27 stsp cat $testroot/wt/alpha $testroot/wt/beta > $testroot/content
1120 f2ea84fa 2019-07-27 stsp cmp -s $testroot/content.expected $testroot/content
1122 f2ea84fa 2019-07-27 stsp if [ "$ret" != "0" ]; then
1123 f2ea84fa 2019-07-27 stsp diff -u $testroot/content.expected $testroot/content
1124 f2ea84fa 2019-07-27 stsp test_done "$testroot" "$ret"
1128 e4d984c2 2019-05-22 stsp echo "U epsilon/zeta" > $testroot/stdout.expected
1129 e4d984c2 2019-05-22 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1130 e4d984c2 2019-05-22 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1131 e4d984c2 2019-05-22 stsp echo >> $testroot/stdout.expected
1133 e4d984c2 2019-05-22 stsp (cd $testroot/wt && got update epsilon > $testroot/stdout)
1135 e4d984c2 2019-05-22 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1137 e4d984c2 2019-05-22 stsp if [ "$ret" != "0" ]; then
1138 e4d984c2 2019-05-22 stsp diff -u $testroot/stdout.expected $testroot/stdout
1139 e4d984c2 2019-05-22 stsp test_done "$testroot" "$ret"
1143 e4d984c2 2019-05-22 stsp echo "modified epsilon/zeta" > $testroot/content.expected
1144 e4d984c2 2019-05-22 stsp cat $testroot/wt/epsilon/zeta > $testroot/content
1146 e4d984c2 2019-05-22 stsp cmp -s $testroot/content.expected $testroot/content
1148 e4d984c2 2019-05-22 stsp if [ "$ret" != "0" ]; then
1149 e4d984c2 2019-05-22 stsp diff -u $testroot/content.expected $testroot/content
1150 e4d984c2 2019-05-22 stsp test_done "$testroot" "$ret"
1154 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1157 c4cdcb68 2019-04-03 stsp function test_update_partial_add {
1158 c4cdcb68 2019-04-03 stsp local testroot=`test_init update_partial_add`
1160 c4cdcb68 2019-04-03 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1162 c4cdcb68 2019-04-03 stsp if [ "$ret" != "0" ]; then
1163 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1167 c4cdcb68 2019-04-03 stsp echo "new" > $testroot/repo/new
1168 c4cdcb68 2019-04-03 stsp echo "epsilon/new2" > $testroot/repo/epsilon/new2
1169 c4cdcb68 2019-04-03 stsp (cd $testroot/repo && git add .)
1170 c4cdcb68 2019-04-03 stsp git_commit $testroot/repo -m "added two files"
1172 f2ea84fa 2019-07-27 stsp echo "A new" > $testroot/stdout.expected
1173 f2ea84fa 2019-07-27 stsp echo "A epsilon/new2" >> $testroot/stdout.expected
1174 f2ea84fa 2019-07-27 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1175 f2ea84fa 2019-07-27 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1176 f2ea84fa 2019-07-27 stsp echo >> $testroot/stdout.expected
1178 f2ea84fa 2019-07-27 stsp (cd $testroot/wt && got update new epsilon/new2 > $testroot/stdout)
1180 f2ea84fa 2019-07-27 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1182 f2ea84fa 2019-07-27 stsp if [ "$ret" != "0" ]; then
1183 f2ea84fa 2019-07-27 stsp diff -u $testroot/stdout.expected $testroot/stdout
1184 f2ea84fa 2019-07-27 stsp test_done "$testroot" "$ret"
1188 f2ea84fa 2019-07-27 stsp echo "new" > $testroot/content.expected
1189 f2ea84fa 2019-07-27 stsp echo "epsilon/new2" >> $testroot/content.expected
1191 f2ea84fa 2019-07-27 stsp cat $testroot/wt/new $testroot/wt/epsilon/new2 > $testroot/content
1193 f2ea84fa 2019-07-27 stsp cmp -s $testroot/content.expected $testroot/content
1195 f2ea84fa 2019-07-27 stsp if [ "$ret" != "0" ]; then
1196 f2ea84fa 2019-07-27 stsp diff -u $testroot/content.expected $testroot/content
1198 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1201 c4cdcb68 2019-04-03 stsp function test_update_partial_rm {
1202 c4cdcb68 2019-04-03 stsp local testroot=`test_init update_partial_rm`
1204 c4cdcb68 2019-04-03 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1206 c4cdcb68 2019-04-03 stsp if [ "$ret" != "0" ]; then
1207 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1211 f2ea84fa 2019-07-27 stsp (cd $testroot/repo && git rm -q alpha epsilon/zeta)
1212 c4cdcb68 2019-04-03 stsp git_commit $testroot/repo -m "removed two files"
1214 f2ea84fa 2019-07-27 stsp echo "got: no such entry found in tree" \
1215 f2ea84fa 2019-07-27 stsp > $testroot/stderr.expected
1217 f2ea84fa 2019-07-27 stsp (cd $testroot/wt && got update alpha epsilon/zeta 2> $testroot/stderr)
1219 f2ea84fa 2019-07-27 stsp if [ "$ret" == "0" ]; then
1220 f2ea84fa 2019-07-27 stsp echo "update succeeded unexpectedly" >&2
1221 f2ea84fa 2019-07-27 stsp test_done "$testroot" "1"
1225 f2ea84fa 2019-07-27 stsp cmp -s $testroot/stderr.expected $testroot/stderr
1227 f2ea84fa 2019-07-27 stsp if [ "$ret" != "0" ]; then
1228 f2ea84fa 2019-07-27 stsp diff -u $testroot/stderr.expected $testroot/stderr
1229 f2ea84fa 2019-07-27 stsp test_done "$testroot" "$ret"
1232 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1235 c4cdcb68 2019-04-03 stsp function test_update_partial_dir {
1236 c4cdcb68 2019-04-03 stsp local testroot=`test_init update_partial_dir`
1238 c4cdcb68 2019-04-03 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1240 c4cdcb68 2019-04-03 stsp if [ "$ret" != "0" ]; then
1241 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1245 c4cdcb68 2019-04-03 stsp echo "modified alpha" > $testroot/repo/alpha
1246 c4cdcb68 2019-04-03 stsp echo "modified beta" > $testroot/repo/beta
1247 c4cdcb68 2019-04-03 stsp echo "modified epsilon/zeta" > $testroot/repo/epsilon/zeta
1248 c4cdcb68 2019-04-03 stsp git_commit $testroot/repo -m "modified two files"
1250 c4cdcb68 2019-04-03 stsp echo "U epsilon/zeta" > $testroot/stdout.expected
1251 c4cdcb68 2019-04-03 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1252 c4cdcb68 2019-04-03 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1253 c4cdcb68 2019-04-03 stsp echo >> $testroot/stdout.expected
1255 c4cdcb68 2019-04-03 stsp (cd $testroot/wt && got update epsilon > $testroot/stdout)
1257 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1259 c4cdcb68 2019-04-03 stsp if [ "$ret" != "0" ]; then
1260 c4cdcb68 2019-04-03 stsp diff -u $testroot/stdout.expected $testroot/stdout
1261 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1265 c4cdcb68 2019-04-03 stsp echo "modified epsilon/zeta" > $testroot/content.expected
1266 c4cdcb68 2019-04-03 stsp cat $testroot/wt/epsilon/zeta > $testroot/content
1268 8d301dd9 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
1270 c4cdcb68 2019-04-03 stsp if [ "$ret" != "0" ]; then
1271 c4cdcb68 2019-04-03 stsp diff -u $testroot/content.expected $testroot/content
1272 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1275 c4cdcb68 2019-04-03 stsp test_done "$testroot" "$ret"
1279 d5bea539 2019-05-13 stsp function test_update_moved_branch_ref {
1280 d5bea539 2019-05-13 stsp local testroot=`test_init update_moved_branch_ref`
1282 d5bea539 2019-05-13 stsp git clone -q --mirror $testroot/repo $testroot/repo2
1284 d5bea539 2019-05-13 stsp echo "modified alpha with git" > $testroot/repo/alpha
1285 d5bea539 2019-05-13 stsp git_commit $testroot/repo -m "modified alpha with git"
1287 d5bea539 2019-05-13 stsp got checkout $testroot/repo2 $testroot/wt > /dev/null
1289 d5bea539 2019-05-13 stsp if [ "$ret" != "0" ]; then
1290 d5bea539 2019-05-13 stsp test_done "$testroot" "$ret"
1294 d5bea539 2019-05-13 stsp echo "modified alpha with got" > $testroot/wt/alpha
1295 d5bea539 2019-05-13 stsp (cd $testroot/wt && got commit -m "modified alpha with got" > /dev/null)
1297 d5bea539 2019-05-13 stsp # + xxxxxxx...yyyyyyy master -> master (forced update)
1298 d5bea539 2019-05-13 stsp (cd $testroot/repo2 && git fetch -q --all)
1300 d5bea539 2019-05-13 stsp echo -n > $testroot/stdout.expected
1301 a1fb16d8 2019-05-24 stsp echo -n "got: work tree's head reference now points to a different " \
1302 a367ff0f 2019-05-14 stsp > $testroot/stderr.expected
1303 a1fb16d8 2019-05-24 stsp echo "branch; new head reference and/or update -b required" \
1304 a1fb16d8 2019-05-24 stsp >> $testroot/stderr.expected
1306 d5bea539 2019-05-13 stsp (cd $testroot/wt && got update > $testroot/stdout 2> $testroot/stderr)
1308 8d301dd9 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1310 d5bea539 2019-05-13 stsp if [ "$ret" != "0" ]; then
1311 d5bea539 2019-05-13 stsp diff -u $testroot/stdout.expected $testroot/stdout
1312 d5bea539 2019-05-13 stsp test_done "$testroot" "$ret"
1316 8d301dd9 2019-05-14 stsp cmp -s $testroot/stderr.expected $testroot/stderr
1318 d5bea539 2019-05-13 stsp if [ "$ret" != "0" ]; then
1319 d5bea539 2019-05-13 stsp diff -u $testroot/stderr.expected $testroot/stderr
1321 d5bea539 2019-05-13 stsp test_done "$testroot" "$ret"
1324 024e9686 2019-05-14 stsp function test_update_to_another_branch {
1325 024e9686 2019-05-14 stsp local testroot=`test_init update_to_another_branch`
1327 024e9686 2019-05-14 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1329 024e9686 2019-05-14 stsp if [ "$ret" != "0" ]; then
1330 024e9686 2019-05-14 stsp test_done "$testroot" "$ret"
1334 024e9686 2019-05-14 stsp echo 'refs/heads/master'> $testroot/head-ref.expected
1335 024e9686 2019-05-14 stsp cmp -s $testroot/head-ref.expected $testroot/wt/.got/head-ref
1337 024e9686 2019-05-14 stsp if [ "$ret" != "0" ]; then
1338 024e9686 2019-05-14 stsp diff -u $testroot/head-ref.expected $testroot/wt/.got/head-ref
1339 024e9686 2019-05-14 stsp test_done "$testroot" "$ret"
1343 024e9686 2019-05-14 stsp (cd $testroot/repo && git checkout -q -b newbranch)
1344 024e9686 2019-05-14 stsp echo "modified alpha on new branch" > $testroot/repo/alpha
1345 024e9686 2019-05-14 stsp git_commit $testroot/repo -m "modified alpha on new branch"
1347 024e9686 2019-05-14 stsp echo "modified alpha in work tree" > $testroot/wt/alpha
1349 d969fa15 2019-05-22 stsp echo "Switching work tree from refs/heads/master to refs/heads/newbranch" > $testroot/stdout.expected
1350 d969fa15 2019-05-22 stsp echo "C alpha" >> $testroot/stdout.expected
1351 024e9686 2019-05-14 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1352 024e9686 2019-05-14 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1353 024e9686 2019-05-14 stsp echo >> $testroot/stdout.expected
1355 024e9686 2019-05-14 stsp (cd $testroot/wt && got update -b newbranch > $testroot/stdout)
1357 024e9686 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1359 024e9686 2019-05-14 stsp if [ "$ret" != "0" ]; then
1360 024e9686 2019-05-14 stsp diff -u $testroot/stdout.expected $testroot/stdout
1361 024e9686 2019-05-14 stsp test_done "$testroot" "$ret"
1365 024e9686 2019-05-14 stsp echo -n "<<<<<<< commit " > $testroot/content.expected
1366 024e9686 2019-05-14 stsp git_show_head $testroot/repo >> $testroot/content.expected
1367 024e9686 2019-05-14 stsp echo >> $testroot/content.expected
1368 024e9686 2019-05-14 stsp echo "modified alpha on new branch" >> $testroot/content.expected
1369 d136cfcb 2019-10-12 stsp echo "|||||||" >> $testroot/content.expected
1370 d136cfcb 2019-10-12 stsp echo "alpha" >> $testroot/content.expected
1371 024e9686 2019-05-14 stsp echo "=======" >> $testroot/content.expected
1372 024e9686 2019-05-14 stsp echo "modified alpha in work tree" >> $testroot/content.expected
1373 024e9686 2019-05-14 stsp echo '>>>>>>> alpha' >> $testroot/content.expected
1375 024e9686 2019-05-14 stsp cat $testroot/wt/alpha > $testroot/content
1377 024e9686 2019-05-14 stsp cmp -s $testroot/content.expected $testroot/content
1379 024e9686 2019-05-14 stsp if [ "$ret" != "0" ]; then
1380 024e9686 2019-05-14 stsp diff -u $testroot/content.expected $testroot/content
1381 024e9686 2019-05-14 stsp test_done "$testroot" "$ret"
1385 024e9686 2019-05-14 stsp echo 'refs/heads/newbranch'> $testroot/head-ref.expected
1386 024e9686 2019-05-14 stsp cmp -s $testroot/head-ref.expected $testroot/wt/.got/head-ref
1388 024e9686 2019-05-14 stsp if [ "$ret" != "0" ]; then
1389 024e9686 2019-05-14 stsp diff -u $testroot/head-ref.expected $testroot/wt/.got/head-ref
1390 a367ff0f 2019-05-14 stsp test_done "$testroot" "$ret"
1394 a367ff0f 2019-05-14 stsp test_done "$testroot" "$ret"
1397 a367ff0f 2019-05-14 stsp function test_update_to_commit_on_wrong_branch {
1398 a367ff0f 2019-05-14 stsp local testroot=`test_init update_to_commit_on_wrong_branch`
1400 a367ff0f 2019-05-14 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1402 a367ff0f 2019-05-14 stsp if [ "$ret" != "0" ]; then
1403 a367ff0f 2019-05-14 stsp test_done "$testroot" "$ret"
1407 a367ff0f 2019-05-14 stsp (cd $testroot/repo && git checkout -q -b newbranch)
1408 a367ff0f 2019-05-14 stsp echo "modified alpha on new branch" > $testroot/repo/alpha
1409 a367ff0f 2019-05-14 stsp git_commit $testroot/repo -m "modified alpha on new branch"
1411 a367ff0f 2019-05-14 stsp echo -n "" > $testroot/stdout.expected
1412 a367ff0f 2019-05-14 stsp echo "got: target commit is on a different branch" \
1413 a367ff0f 2019-05-14 stsp > $testroot/stderr.expected
1415 a367ff0f 2019-05-14 stsp local head_rev=`git_show_head $testroot/repo`
1416 a367ff0f 2019-05-14 stsp (cd $testroot/wt && got update -c $head_rev > $testroot/stdout \
1417 a367ff0f 2019-05-14 stsp 2> $testroot/stderr)
1419 a367ff0f 2019-05-14 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1421 a367ff0f 2019-05-14 stsp if [ "$ret" != "0" ]; then
1422 a367ff0f 2019-05-14 stsp diff -u $testroot/stdout.expected $testroot/stdout
1423 024e9686 2019-05-14 stsp test_done "$testroot" "$ret"
1427 a367ff0f 2019-05-14 stsp cmp -s $testroot/stderr.expected $testroot/stderr
1429 a367ff0f 2019-05-14 stsp if [ "$ret" != "0" ]; then
1430 a367ff0f 2019-05-14 stsp diff -u $testroot/stderr.expected $testroot/stderr
1431 a367ff0f 2019-05-14 stsp test_done "$testroot" "$ret"
1435 024e9686 2019-05-14 stsp test_done "$testroot" "$ret"
1438 c932eeeb 2019-05-22 stsp function test_update_bumps_base_commit_id {
1439 a5e55564 2019-06-10 stsp local testroot=`test_init update_bumps_base_commit_id`
1441 1a36436d 2019-06-10 stsp echo "psi" > $testroot/repo/epsilon/psi
1442 1a36436d 2019-06-10 stsp (cd $testroot/repo && git add .)
1443 1a36436d 2019-06-10 stsp git_commit $testroot/repo -m "adding another file"
1445 c932eeeb 2019-05-22 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1447 c932eeeb 2019-05-22 stsp if [ "$ret" != "0" ]; then
1448 c932eeeb 2019-05-22 stsp test_done "$testroot" "$ret"
1452 1a36436d 2019-06-10 stsp echo "modified psi" > $testroot/wt/epsilon/psi
1453 1a36436d 2019-06-10 stsp (cd $testroot/wt && got commit -m "changed psi" > $testroot/stdout)
1455 c932eeeb 2019-05-22 stsp local head_rev=`git_show_head $testroot/repo`
1456 1a36436d 2019-06-10 stsp echo "M epsilon/psi" > $testroot/stdout.expected
1457 a7648d7a 2019-06-02 stsp echo "Created commit $head_rev" >> $testroot/stdout.expected
1458 c932eeeb 2019-05-22 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1460 c932eeeb 2019-05-22 stsp if [ "$ret" != "0" ]; then
1461 c932eeeb 2019-05-22 stsp diff -u $testroot/stdout.expected $testroot/stdout
1462 c932eeeb 2019-05-22 stsp test_done "$testroot" "$ret"
1466 305993b9 2019-07-28 stsp echo "changed zeta with git" > $testroot/repo/epsilon/zeta
1467 9bead371 2019-07-28 stsp (cd $testroot/repo && git add .)
1468 9bead371 2019-07-28 stsp git_commit $testroot/repo -m "changing zeta with git"
1470 1a36436d 2019-06-10 stsp echo "modified zeta" > $testroot/wt/epsilon/zeta
1471 1a36436d 2019-06-10 stsp (cd $testroot/wt && got commit -m "changed zeta" > $testroot/stdout \
1472 c932eeeb 2019-05-22 stsp 2> $testroot/stderr)
1474 c932eeeb 2019-05-22 stsp echo -n "" > $testroot/stdout.expected
1475 c932eeeb 2019-05-22 stsp echo "got: work tree must be updated before these changes can be committed" > $testroot/stderr.expected
1476 c932eeeb 2019-05-22 stsp cmp -s $testroot/stderr.expected $testroot/stderr
1478 c932eeeb 2019-05-22 stsp if [ "$ret" != "0" ]; then
1479 c932eeeb 2019-05-22 stsp diff -u $testroot/stderr.expected $testroot/stderr
1480 c932eeeb 2019-05-22 stsp test_done "$testroot" "$ret"
1484 c932eeeb 2019-05-22 stsp (cd $testroot/wt && got update > $testroot/stdout)
1486 9bead371 2019-07-28 stsp echo "U epsilon/psi" > $testroot/stdout.expected
1487 9bead371 2019-07-28 stsp echo "C epsilon/zeta" >> $testroot/stdout.expected
1488 a484d721 2019-06-10 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1489 a484d721 2019-06-10 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1490 a484d721 2019-06-10 stsp echo >> $testroot/stdout.expected
1491 c932eeeb 2019-05-22 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1493 c932eeeb 2019-05-22 stsp if [ "$ret" != "0" ]; then
1494 c932eeeb 2019-05-22 stsp diff -u $testroot/stdout.expected $testroot/stdout
1495 c932eeeb 2019-05-22 stsp test_done "$testroot" "$ret"
1499 9bead371 2019-07-28 stsp # resolve conflict
1500 9bead371 2019-07-28 stsp echo "modified zeta with got and git" > $testroot/wt/epsilon/zeta
1502 1a36436d 2019-06-10 stsp (cd $testroot/wt && got commit -m "changed zeta" > $testroot/stdout)
1504 c932eeeb 2019-05-22 stsp local head_rev=`git_show_head $testroot/repo`
1505 1a36436d 2019-06-10 stsp echo "M epsilon/zeta" > $testroot/stdout.expected
1506 a7648d7a 2019-06-02 stsp echo "Created commit $head_rev" >> $testroot/stdout.expected
1507 303e2782 2019-08-09 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1509 303e2782 2019-08-09 stsp if [ "$ret" != "0" ]; then
1510 303e2782 2019-08-09 stsp diff -u $testroot/stdout.expected $testroot/stdout
1511 303e2782 2019-08-09 stsp test_done "$testroot" "$ret"
1515 303e2782 2019-08-09 stsp test_done "$testroot" "$ret"
1518 303e2782 2019-08-09 stsp function test_update_tag {
1519 303e2782 2019-08-09 stsp local testroot=`test_init update_tag`
1520 303e2782 2019-08-09 stsp local tag="1.0.0"
1522 303e2782 2019-08-09 stsp got checkout $testroot/repo $testroot/wt > /dev/null
1524 303e2782 2019-08-09 stsp if [ "$ret" != "0" ]; then
1525 303e2782 2019-08-09 stsp test_done "$testroot" "$ret"
1529 303e2782 2019-08-09 stsp echo "modified alpha" > $testroot/repo/alpha
1530 303e2782 2019-08-09 stsp git_commit $testroot/repo -m "modified alpha"
1531 303e2782 2019-08-09 stsp (cd $testroot/repo && git tag -m "test" -a $tag)
1533 303e2782 2019-08-09 stsp echo "U alpha" > $testroot/stdout.expected
1534 303e2782 2019-08-09 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1535 303e2782 2019-08-09 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1536 303e2782 2019-08-09 stsp echo >> $testroot/stdout.expected
1538 303e2782 2019-08-09 stsp (cd $testroot/wt && got update -c $tag > $testroot/stdout)
1540 c932eeeb 2019-05-22 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1542 c932eeeb 2019-05-22 stsp if [ "$ret" != "0" ]; then
1543 c932eeeb 2019-05-22 stsp diff -u $testroot/stdout.expected $testroot/stdout
1544 c932eeeb 2019-05-22 stsp test_done "$testroot" "$ret"
1548 303e2782 2019-08-09 stsp echo "modified alpha" > $testroot/content.expected
1549 303e2782 2019-08-09 stsp cat $testroot/wt/alpha > $testroot/content
1551 303e2782 2019-08-09 stsp cmp -s $testroot/content.expected $testroot/content
1553 303e2782 2019-08-09 stsp if [ "$ret" != "0" ]; then
1554 303e2782 2019-08-09 stsp diff -u $testroot/content.expected $testroot/content
1556 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1559 523b8417 2019-10-19 stsp function test_update_toggles_xbit {
1560 523b8417 2019-10-19 stsp local testroot=`test_init update_toggles_xbit 1`
1562 523b8417 2019-10-19 stsp touch $testroot/repo/xfile
1563 523b8417 2019-10-19 stsp chmod +x $testroot/repo/xfile
1564 523b8417 2019-10-19 stsp (cd $testroot/repo && git add .)
1565 523b8417 2019-10-19 stsp git_commit $testroot/repo -m "adding executable file"
1566 523b8417 2019-10-19 stsp local commit_id1=`git_show_head $testroot/repo`
1568 523b8417 2019-10-19 stsp got checkout $testroot/repo $testroot/wt > $testroot/stdout
1570 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1571 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1575 523b8417 2019-10-19 stsp ls -l $testroot/wt/xfile | grep -q '^-rwx'
1577 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1578 523b8417 2019-10-19 stsp echo "file is not executable" >&2
1579 523b8417 2019-10-19 stsp ls -l $testroot/wt/xfile >&2
1580 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1584 523b8417 2019-10-19 stsp chmod -x $testroot/wt/xfile
1585 523b8417 2019-10-19 stsp (cd $testroot/wt && got commit -m "clear x bit" >/dev/null)
1586 523b8417 2019-10-19 stsp local commit_id2=`git_show_head $testroot/repo`
1588 523b8417 2019-10-19 stsp echo "U xfile" > $testroot/stdout.expected
1589 523b8417 2019-10-19 stsp echo -n "Updated to commit " >> $testroot/stdout.expected
1590 523b8417 2019-10-19 stsp git_show_head $testroot/repo >> $testroot/stdout.expected
1591 523b8417 2019-10-19 stsp echo >> $testroot/stdout.expected
1593 523b8417 2019-10-19 stsp (cd $testroot/wt && got update -c $commit_id1 > $testroot/stdout)
1595 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1596 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1600 523b8417 2019-10-19 stsp echo "U xfile" > $testroot/stdout.expected
1601 523b8417 2019-10-19 stsp echo "Updated to commit $commit_id1" >> $testroot/stdout.expected
1602 523b8417 2019-10-19 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1604 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1605 523b8417 2019-10-19 stsp diff -u $testroot/stdout.expected $testroot/stdout
1606 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1611 523b8417 2019-10-19 stsp ls -l $testroot/wt/xfile | grep -q '^-rwx'
1613 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1614 523b8417 2019-10-19 stsp echo "file is not executable" >&2
1615 523b8417 2019-10-19 stsp ls -l $testroot/wt/xfile >&2
1616 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1620 523b8417 2019-10-19 stsp (cd $testroot/wt && got update > $testroot/stdout)
1622 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1623 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1627 523b8417 2019-10-19 stsp echo "U xfile" > $testroot/stdout.expected
1628 523b8417 2019-10-19 stsp echo "Updated to commit $commit_id2" >> $testroot/stdout.expected
1629 523b8417 2019-10-19 stsp cmp -s $testroot/stdout.expected $testroot/stdout
1631 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1632 523b8417 2019-10-19 stsp diff -u $testroot/stdout.expected $testroot/stdout
1633 523b8417 2019-10-19 stsp test_done "$testroot" "$ret"
1637 523b8417 2019-10-19 stsp ls -l $testroot/wt/xfile | grep -q '^-rw-'
1639 523b8417 2019-10-19 stsp if [ "$ret" != "0" ]; then
1640 523b8417 2019-10-19 stsp echo "file is unexpectedly executable" >&2
1641 523b8417 2019-10-19 stsp ls -l $testroot/wt/xfile >&2
1643 c932eeeb 2019-05-22 stsp test_done "$testroot" "$ret"
1646 c84d8c75 2019-01-02 stsp run_test test_update_basic
1647 3b4d3732 2019-01-02 stsp run_test test_update_adds_file
1648 512f0d0e 2019-01-02 stsp run_test test_update_deletes_file
1649 f5c49f82 2019-01-06 stsp run_test test_update_deletes_dir
1650 5cc266ba 2019-01-06 stsp run_test test_update_deletes_dir_with_path_prefix
1651 90285c3b 2019-01-08 stsp run_test test_update_deletes_dir_recursively
1652 4482e97b 2019-01-08 stsp run_test test_update_sibling_dirs_with_common_prefix
1653 50952927 2019-01-12 stsp run_test test_update_dir_with_dot_sibling
1654 46cee7a3 2019-01-12 stsp run_test test_update_moves_files_upwards
1655 bd4792ec 2019-01-13 stsp run_test test_update_moves_files_to_new_dir
1656 4a1ddfc2 2019-01-12 stsp run_test test_update_creates_missing_parent
1657 bd4792ec 2019-01-13 stsp run_test test_update_creates_missing_parent_with_subdir
1658 21908da4 2019-01-13 stsp run_test test_update_file_in_subsubdir
1659 6353ad76 2019-02-08 stsp run_test test_update_merges_file_edits
1660 68ed9ba5 2019-02-10 stsp run_test test_update_keeps_xbit
1661 ba8a0d4d 2019-02-10 stsp run_test test_update_clears_xbit
1662 a378724f 2019-02-10 stsp run_test test_update_restores_missing_file
1663 085d5bcf 2019-03-27 stsp run_test test_update_conflict_wt_add_vs_repo_add
1664 085d5bcf 2019-03-27 stsp run_test test_update_conflict_wt_edit_vs_repo_rm
1665 13d9040b 2019-03-27 stsp run_test test_update_conflict_wt_rm_vs_repo_edit
1666 66b11bf5 2019-03-27 stsp run_test test_update_conflict_wt_rm_vs_repo_rm
1667 c4cdcb68 2019-04-03 stsp run_test test_update_partial
1668 c4cdcb68 2019-04-03 stsp run_test test_update_partial_add
1669 c4cdcb68 2019-04-03 stsp run_test test_update_partial_rm
1670 c4cdcb68 2019-04-03 stsp run_test test_update_partial_dir
1671 d5bea539 2019-05-13 stsp run_test test_update_moved_branch_ref
1672 024e9686 2019-05-14 stsp run_test test_update_to_another_branch
1673 a367ff0f 2019-05-14 stsp run_test test_update_to_commit_on_wrong_branch
1674 c932eeeb 2019-05-22 stsp run_test test_update_bumps_base_commit_id
1675 303e2782 2019-08-09 stsp run_test test_update_tag
1676 523b8417 2019-10-19 stsp run_test test_update_toggles_xbit