equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 echo |
|
4 echo % prepare repo a |
|
5 mkdir a |
|
6 cd a |
|
7 hg init |
|
8 echo foo > bar |
|
9 hg commit -Am default |
|
10 hg up -r null |
|
11 hg branch mine |
|
12 echo hello > world |
|
13 hg commit -Am hello |
|
14 hg up -r null |
|
15 hg branch other |
|
16 echo good > bye |
|
17 hg commit -Am other |
|
18 hg up -r mine |
|
19 |
|
20 echo % test -U -u |
|
21 hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other |
|
22 |
|
23 echo % test -U |
|
24 hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other |
|
25 rm -rf ../b |
|
26 |
|
27 echo % test -u . |
|
28 hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other |
|
29 rm -rf ../b |
|
30 |
|
31 echo % test -u 0 |
|
32 hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other |
|
33 rm -rf ../b |
|
34 |
|
35 echo % test -u 1 |
|
36 hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other |
|
37 rm -rf ../b |
|
38 |
|
39 echo % test -u 2 |
|
40 hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other |
|
41 rm -rf ../b |
|
42 |
|
43 echo % test -r 0 |
|
44 hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other |
|
45 rm -rf ../b |
|
46 |
|
47 echo % test -r mine ... mine is ignored |
|
48 hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other |
|
49 rm -rf ../b |
|
50 |
|
51 echo % test -b default |
|
52 hg clone .#other ../b -b default -b mine |
|
53 rm -rf ../b |
|
54 |
|
55 echo % test #other |
|
56 hg clone .#other ../b |
|
57 rm -rf ../b |
|
58 |
|
59 echo % test tip |
|
60 hg clone -U . ../c -r 1 -r 2 > /dev/null |
|
61 hg clone ../c ../b |
|
62 rm -rf ../b ../c |
|
63 cd .. |
|
64 |
|
65 rm -rf a |
|
66 exit 0 |