equal
deleted
inserted
replaced
1 #!/bin/sh |
|
2 |
|
3 hg init |
|
4 echo a > a |
|
5 hg commit -A -ma |
|
6 |
|
7 echo b >> a |
|
8 hg commit -mb |
|
9 |
|
10 echo c >> a |
|
11 hg commit -mc |
|
12 |
|
13 hg up 1 |
|
14 echo d >> a |
|
15 hg commit -md |
|
16 |
|
17 hg up 1 |
|
18 echo e >> a |
|
19 hg commit -me |
|
20 |
|
21 hg up 1 |
|
22 echo % should fail because not at a head |
|
23 hg merge |
|
24 |
|
25 hg up |
|
26 echo % should fail because \> 2 heads |
|
27 HGMERGE=internal:other; export HGMERGE |
|
28 hg merge |
|
29 |
|
30 echo % should succeed |
|
31 hg merge 2 |
|
32 hg commit -mm1 |
|
33 |
|
34 echo % should succeed - 2 heads |
|
35 hg merge -P |
|
36 hg merge |
|
37 hg commit -mm2 |
|
38 |
|
39 echo % should fail because at tip |
|
40 hg merge |
|
41 |
|
42 hg up 0 |
|
43 echo % should fail because 1 head |
|
44 hg merge |
|
45 |
|
46 hg up 3 |
|
47 echo f >> a |
|
48 hg branch foobranch |
|
49 hg commit -mf |
|
50 echo % should fail because merge with other branch |
|
51 hg merge |
|
52 |
|
53 # Test for issue2043: ensure that 'merge -P' shows ancestors of 6 that |
|
54 # are not ancestors of 7, regardless of where their least common |
|
55 # ancestor is. |
|
56 echo % merge preview not affected by common ancestor |
|
57 hg up -q 7 |
|
58 hg merge -q -P 6 # expect: 2, 4, 5, 6 |
|
59 |
|
60 true |
|