comparison tests/test-addremove-similar.t @ 39707:5abc47d4ca6b

tests: quote PYTHON usage Python3 defaults to installing under "Program Files".
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 18 Sep 2018 23:47:21 -0400
parents 4441705b7111
children 5b89626c11e9
comparison
equal deleted inserted replaced
39706:030d558c6456 39707:5abc47d4ca6b
1 $ hg init rep; cd rep 1 $ hg init rep; cd rep
2 2
3 $ touch empty-file 3 $ touch empty-file
4 $ $PYTHON -c 'for x in range(10000): print(x)' > large-file 4 $ "$PYTHON" -c 'for x in range(10000): print(x)' > large-file
5 5
6 $ hg addremove 6 $ hg addremove
7 adding empty-file 7 adding empty-file
8 adding large-file 8 adding large-file
9 9
10 $ hg commit -m A 10 $ hg commit -m A
11 11
12 $ rm large-file empty-file 12 $ rm large-file empty-file
13 $ $PYTHON -c 'for x in range(10,10000): print(x)' > another-file 13 $ "$PYTHON" -c 'for x in range(10,10000): print(x)' > another-file
14 14
15 $ hg addremove -s50 15 $ hg addremove -s50
16 adding another-file 16 adding another-file
17 removing empty-file 17 removing empty-file
18 removing large-file 18 removing large-file
32 32
33 $ cd .. 33 $ cd ..
34 34
35 $ hg init rep2; cd rep2 35 $ hg init rep2; cd rep2
36 36
37 $ $PYTHON -c 'for x in range(10000): print(x)' > large-file 37 $ "$PYTHON" -c 'for x in range(10000): print(x)' > large-file
38 $ $PYTHON -c 'for x in range(50): print(x)' > tiny-file 38 $ "$PYTHON" -c 'for x in range(50): print(x)' > tiny-file
39 39
40 $ hg addremove 40 $ hg addremove
41 adding large-file 41 adding large-file
42 adding tiny-file 42 adding tiny-file
43 43
44 $ hg commit -m A 44 $ hg commit -m A
45 45
46 $ $PYTHON -c 'for x in range(70): print(x)' > small-file 46 $ "$PYTHON" -c 'for x in range(70): print(x)' > small-file
47 $ rm tiny-file 47 $ rm tiny-file
48 $ rm large-file 48 $ rm large-file
49 49
50 $ hg addremove -s50 50 $ hg addremove -s50
51 removing large-file 51 removing large-file
55 55
56 $ hg commit -m B 56 $ hg commit -m B
57 57
58 should be sorted by path for stable result 58 should be sorted by path for stable result
59 59
60 $ for i in `$PYTHON $TESTDIR/seq.py 0 9`; do 60 $ for i in `"$PYTHON" $TESTDIR/seq.py 0 9`; do
61 > cp small-file $i 61 > cp small-file $i
62 > done 62 > done
63 $ rm small-file 63 $ rm small-file
64 $ hg addremove 64 $ hg addremove
65 adding 0 65 adding 0
86 $ hg commit -m '10 same files' 86 $ hg commit -m '10 same files'
87 87
88 pick one from many identical files 88 pick one from many identical files
89 89
90 $ cp 0 a 90 $ cp 0 a
91 $ rm `$PYTHON $TESTDIR/seq.py 0 9` 91 $ rm `"$PYTHON" $TESTDIR/seq.py 0 9`
92 $ hg addremove 92 $ hg addremove
93 removing 0 93 removing 0
94 removing 1 94 removing 1
95 removing 2 95 removing 2
96 removing 3 96 removing 3
105 $ hg revert -aq 105 $ hg revert -aq
106 106
107 pick one from many similar files 107 pick one from many similar files
108 108
109 $ cp 0 a 109 $ cp 0 a
110 $ for i in `$PYTHON $TESTDIR/seq.py 0 9`; do 110 $ for i in `"$PYTHON" $TESTDIR/seq.py 0 9`; do
111 > echo $i >> $i 111 > echo $i >> $i
112 > done 112 > done
113 $ hg commit -m 'make them slightly different' 113 $ hg commit -m 'make them slightly different'
114 $ rm `$PYTHON $TESTDIR/seq.py 0 9` 114 $ rm `"$PYTHON" $TESTDIR/seq.py 0 9`
115 $ hg addremove -s50 115 $ hg addremove -s50
116 removing 0 116 removing 0
117 removing 1 117 removing 1
118 removing 2 118 removing 2
119 removing 3 119 removing 3