comparison tests/test-merge-criss-cross.t @ 20636:12580e04cc43

tests: add test case for criss cross merge The test do not fit in any existing test file...
author Mads Kiilerich <madski@unity3d.com>
date Sun, 02 Mar 2014 18:25:19 +0100
parents
children e94e90a4526e
comparison
equal deleted inserted replaced
20635:7cd956ace1f4 20636:12580e04cc43
1 Criss cross merging
2
3 $ hg init criss-cross
4 $ cd criss-cross
5 $ echo '0 base' > f1
6 $ echo '0 base' > f2
7 $ hg ci -Aqm '0 base'
8
9 $ echo '1 first change' > f1
10 $ hg ci -m '1 first change f1'
11
12 $ hg up -qr0
13 $ echo '2 first change' > f2
14 $ hg ci -qm '2 first change f2'
15
16 $ hg merge -qr 1
17 $ hg ci -m '3 merge'
18
19 $ hg up -qr2
20 $ hg merge -qr1
21 $ hg ci -qm '4 merge'
22
23 $ echo '5 second change' > f1
24 $ hg ci -m '5 second change f1'
25
26 $ hg up -qr3
27 $ echo '6 second change' > f2
28 $ hg ci -m '6 second change f2'
29
30 $ hg log -G
31 @ changeset: 6:3b08d01b0ab5
32 | tag: tip
33 | parent: 3:cf89f02107e5
34 | user: test
35 | date: Thu Jan 01 00:00:00 1970 +0000
36 | summary: 6 second change f2
37 |
38 | o changeset: 5:adfe50279922
39 | | user: test
40 | | date: Thu Jan 01 00:00:00 1970 +0000
41 | | summary: 5 second change f1
42 | |
43 | o changeset: 4:7d3e55501ae6
44 | |\ parent: 2:40663881a6dd
45 | | | parent: 1:0f6b37dbe527
46 | | | user: test
47 | | | date: Thu Jan 01 00:00:00 1970 +0000
48 | | | summary: 4 merge
49 | | |
50 o---+ changeset: 3:cf89f02107e5
51 | | | parent: 2:40663881a6dd
52 |/ / parent: 1:0f6b37dbe527
53 | | user: test
54 | | date: Thu Jan 01 00:00:00 1970 +0000
55 | | summary: 3 merge
56 | |
57 | o changeset: 2:40663881a6dd
58 | | parent: 0:40494bf2444c
59 | | user: test
60 | | date: Thu Jan 01 00:00:00 1970 +0000
61 | | summary: 2 first change f2
62 | |
63 o | changeset: 1:0f6b37dbe527
64 |/ user: test
65 | date: Thu Jan 01 00:00:00 1970 +0000
66 | summary: 1 first change f1
67 |
68 o changeset: 0:40494bf2444c
69 user: test
70 date: Thu Jan 01 00:00:00 1970 +0000
71 summary: 0 base
72
73
74 $ hg merge -v --debug --tool internal:dump 5
75 searching for copies back to rev 3
76 resolving manifests
77 branchmerge: True, force: False, partial: False
78 ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
79 f1: remote is newer -> g
80 f2: versions differ -> m
81 preserving f2 for resolve of f2
82 getting f1
83 updating: f1 1/2 files (50.00%)
84 updating: f2 2/2 files (100.00%)
85 picked tool 'internal:dump' for f2 (binary False symlink False)
86 merging f2
87 my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c
88 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
89 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
90 [1]
91
92 $ head *
93 ==> f1 <==
94 5 second change
95
96 ==> f2 <==
97 6 second change
98
99 ==> f2.base <==
100 0 base
101
102 ==> f2.local <==
103 6 second change
104
105 ==> f2.orig <==
106 6 second change
107
108 ==> f2.other <==
109 2 first change
110
111 $ cd ..