annotate tests/test-addremove-similar.t @ 51460:cebd96dee99a

branchcache: move the filename to a class attribute This prepare the introduction of more variant of cache.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 25 Feb 2024 20:40:37 +0100
parents 5b89626c11e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
1 $ hg init rep; cd rep
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
2
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
3 $ touch empty-file
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
4 $ "$PYTHON" -c 'for x in range(10000): print(x)' > large-file
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
5
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
6 $ hg addremove
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
7 adding empty-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
8 adding large-file
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
9
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
10 $ hg commit -m A
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
11
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
12 $ rm large-file empty-file
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
13 $ "$PYTHON" -c 'for x in range(10,10000): print(x)' > another-file
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
14
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
15 $ hg addremove -s50
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
16 adding another-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
17 removing empty-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
18 removing large-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
19 recording removal of large-file as rename to another-file (99% similar)
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
20
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
21 $ hg commit -m B
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
22
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
23 comparing two empty files caused ZeroDivisionError in the past
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
24
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
25 $ hg update -C 0
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
26 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
27 $ rm empty-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
28 $ touch another-empty-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
29 $ hg addremove -s50
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
30 adding another-empty-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
31 removing empty-file
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
32
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
33 $ cd ..
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
34
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
35 $ hg init rep2; cd rep2
4472
736e49292809 addremove: comparing two empty files caused ZeroDivisionError
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4135
diff changeset
36
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
37 $ "$PYTHON" -c 'for x in range(10000): print(x)' > large-file
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
38 $ "$PYTHON" -c 'for x in range(50): print(x)' > tiny-file
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
39
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
40 $ hg addremove
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
41 adding large-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
42 adding tiny-file
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
43
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
44 $ hg commit -m A
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
45
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
46 $ "$PYTHON" -c 'for x in range(70): print(x)' > small-file
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
47 $ rm tiny-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
48 $ rm large-file
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
49
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
50 $ hg addremove -s50
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
51 removing large-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
52 adding small-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
53 removing tiny-file
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
54 recording removal of tiny-file as rename to small-file (82% similar)
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
55
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
56 $ hg commit -m B
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
57
31579
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
58 should be sorted by path for stable result
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
59
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
60 $ for i in `"$PYTHON" $TESTDIR/seq.py 0 9`; do
31579
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
61 > cp small-file $i
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
62 > done
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
63 $ rm small-file
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
64 $ hg addremove
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
65 adding 0
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
66 adding 1
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
67 adding 2
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
68 adding 3
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
69 adding 4
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
70 adding 5
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
71 adding 6
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
72 adding 7
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
73 adding 8
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
74 adding 9
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
75 removing small-file
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
76 recording removal of small-file as rename to 0 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
77 recording removal of small-file as rename to 1 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
78 recording removal of small-file as rename to 2 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
79 recording removal of small-file as rename to 3 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
80 recording removal of small-file as rename to 4 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
81 recording removal of small-file as rename to 5 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
82 recording removal of small-file as rename to 6 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
83 recording removal of small-file as rename to 7 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
84 recording removal of small-file as rename to 8 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
85 recording removal of small-file as rename to 9 (100% similar)
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
86 $ hg commit -m '10 same files'
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
87
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
88 pick one from many identical files
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
89
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
90 $ cp 0 a
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
91 $ rm `"$PYTHON" $TESTDIR/seq.py 0 9`
31579
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
92 $ hg addremove
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
93 removing 0
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
94 removing 1
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
95 removing 2
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
96 removing 3
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
97 removing 4
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
98 removing 5
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
99 removing 6
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
100 removing 7
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
101 removing 8
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
102 removing 9
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
103 adding a
31583
2efd9771323e similar: take the first match instead of the last
Yuya Nishihara <yuya@tcha.org>
parents: 31579
diff changeset
104 recording removal of 0 as rename to a (100% similar)
31579
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
105 $ hg revert -aq
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
106
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
107 pick one from many similar files
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
108
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
109 $ cp 0 a
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
110 $ for i in `"$PYTHON" $TESTDIR/seq.py 0 9`; do
31579
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
111 > echo $i >> $i
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
112 > done
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
113 $ hg commit -m 'make them slightly different'
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 35393
diff changeset
114 $ rm `"$PYTHON" $TESTDIR/seq.py 0 9`
31579
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
115 $ hg addremove -s50
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
116 removing 0
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
117 removing 1
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
118 removing 2
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
119 removing 3
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
120 removing 4
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
121 removing 5
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
122 removing 6
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
123 removing 7
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
124 removing 8
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
125 removing 9
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
126 adding a
31583
2efd9771323e similar: take the first match instead of the last
Yuya Nishihara <yuya@tcha.org>
parents: 31579
diff changeset
127 recording removal of 0 as rename to a (99% similar)
31579
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
128 $ hg commit -m 'always the same file should be selected'
3a383caa97f4 similar: sort files not by object id but by path for stable result
Yuya Nishihara <yuya@tcha.org>
parents: 29174
diff changeset
129
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
130 should all fail
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
131
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
132 $ hg addremove -s foo
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
133 abort: similarity must be a number
48031
5b89626c11e9 errors: use InputError for bad --similarity value
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
134 [10]
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
135 $ hg addremove -s -1
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
136 abort: similarity must be between 0 and 100
48031
5b89626c11e9 errors: use InputError for bad --similarity value
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
137 [10]
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
138 $ hg addremove -s 1e6
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
139 abort: similarity must be between 0 and 100
48031
5b89626c11e9 errors: use InputError for bad --similarity value
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
140 [10]
4135
6cb6cfe43c5d Avoid some false positives for addremove -s
Erling Ellingsen <erlingalf@gmail.com>
parents:
diff changeset
141
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
142 $ cd ..
4966
8d982aef0be1 addremove: print meaningful error message if --similar not numeric
Bryan O'Sullivan <bos@serpentine.com>
parents: 4472
diff changeset
143
26587
56b2bcea2529 error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23481
diff changeset
144 Issue1527: repeated addremove causes Abort
8489
1a96f1d9599b addremove/findrenames: find renames according to the match object (issue1527)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4966
diff changeset
145
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
146 $ hg init rep3; cd rep3
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
147 $ mkdir d
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
148 $ echo a > d/a
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
149 $ hg add d/a
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
150 $ hg commit -m 1
8489
1a96f1d9599b addremove/findrenames: find renames according to the match object (issue1527)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4966
diff changeset
151
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
152 $ mv d/a d/b
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
153 $ hg addremove -s80
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
154 removing d/a
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
155 adding d/b
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 32940
diff changeset
156 recording removal of d/a as rename to d/b (100% similar)
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
157 $ hg debugstate
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
158 r 0 0 1970-01-01 00:00:00 d/a
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
159 a 0 -1 unset d/b
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
160 copy: d/a -> d/b
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
161 $ mv d/b c
8489
1a96f1d9599b addremove/findrenames: find renames according to the match object (issue1527)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4966
diff changeset
162
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
163 no copies found here (since the target isn't in d
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
164
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
165 $ hg addremove -s80 d
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 32940
diff changeset
166 removing d/b
11851
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
167
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
168 copies here
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
169
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
170 $ hg addremove -s80
db955418a6af tests: unify test-addremove-similar
Martin Geisler <mg@lazybytes.net>
parents: 8489
diff changeset
171 adding c
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 32940
diff changeset
172 recording removal of d/a as rename to c (100% similar)
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15447
diff changeset
173
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15447
diff changeset
174 $ cd ..