Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-backout @ 2289:854954fd410a
Fix revlog.parseindex
parseindex could fail if read returns too little data in the right
moment (e.g. when there's still leftover data from the previous
iteration and read returns less than "s" bytes).
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sun, 14 May 2006 18:22:12 -0300 |
parents | 1092533fd11c |
children | 2f4addf56715 |
rev | line source |
---|---|
2158 | 1 #!/bin/sh |
2 | |
3 echo '# basic operation' | |
4 hg init basic | |
5 cd basic | |
6 echo a > a | |
7 hg commit -d '0 0' -A -m a | |
8 echo b >> a | |
9 hg commit -d '1 0' -m b | |
10 | |
11 hg backout -d '2 0' tip | |
12 cat a | |
13 | |
14 echo '# file that was removed is recreated' | |
15 cd .. | |
16 hg init remove | |
17 cd remove | |
18 | |
19 echo content > a | |
20 hg commit -d '0 0' -A -m a | |
21 | |
22 hg rm a | |
23 hg commit -d '1 0' -m b | |
24 | |
25 hg backout -d '2 0' --merge tip | |
26 cat a | |
27 | |
28 echo '# backout of backout is as if nothing happened' | |
29 | |
30 hg backout -d '3 0' --merge tip | |
2186
1092533fd11c
tests: fix compatibility on Solaris
TK Soh <teekaysoh@yahoo.com>
parents:
2158
diff
changeset
|
31 cat a 2>/dev/null || echo cat: a: No such file or directory |
2158 | 32 |
33 echo '# backout with merge' | |
34 cd .. | |
35 hg init merge | |
36 cd merge | |
37 | |
38 echo line 1 > a | |
39 hg commit -d '0 0' -A -m a | |
40 | |
41 echo line 2 >> a | |
42 hg commit -d '1 0' -m b | |
43 | |
44 echo line 3 >> a | |
45 hg commit -d '2 0' -m c | |
46 | |
47 hg backout --merge -d '3 0' 1 | |
48 hg commit -d '4 0' -m d | |
49 cat a | |
50 | |
51 exit 0 |