1initial 2 $ hg init test-a 3 $ cd test-a 4 $ cat >test.txt <<"EOF" 5 > 1 6 > 2 7 > 3 8 > EOF 9 $ hg add test.txt 10 $ hg commit -m "Initial" 11 12clone 13 $ cd .. 14 $ hg clone test-a test-b 15 updating to branch default 16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 17 18change test-a 19 $ cd test-a 20 $ cat >test.txt <<"EOF" 21 > one 22 > two 23 > three 24 > EOF 25 $ hg commit -m "Numbers as words" 26 27change test-b 28 $ cd ../test-b 29 $ cat >test.txt <<"EOF" 30 > 1 31 > 2.5 32 > 3 33 > EOF 34 $ hg commit -m "2 -> 2.5" 35 36now pull and merge from test-a 37 $ hg pull ../test-a 38 pulling from ../test-a 39 searching for changes 40 adding changesets 41 adding manifests 42 adding file changes 43 added 1 changesets with 1 changes to 1 files (+1 heads) 44 new changesets 96b70246a118 45 (run 'hg heads' to see heads, 'hg merge' to merge) 46 $ hg merge 47 merging test.txt 48 warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') 49 0 files updated, 0 files merged, 0 files removed, 1 files unresolved 50 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon 51 [1] 52resolve conflict 53 $ cat >test.txt <<"EOF" 54 > one 55 > two-point-five 56 > three 57 > EOF 58 $ rm -f *.orig 59 $ hg resolve -m test.txt 60 (no more unresolved files) 61 $ hg commit -m "Merge 1" 62 63change test-a again 64 $ cd ../test-a 65 $ cat >test.txt <<"EOF" 66 > one 67 > two-point-one 68 > three 69 > EOF 70 $ hg commit -m "two -> two-point-one" 71 72pull and merge from test-a again 73 $ cd ../test-b 74 $ hg pull ../test-a 75 pulling from ../test-a 76 searching for changes 77 adding changesets 78 adding manifests 79 adding file changes 80 added 1 changesets with 1 changes to 1 files (+1 heads) 81 new changesets 40d11a4173a8 82 (run 'hg heads' to see heads, 'hg merge' to merge) 83 $ hg merge --debug 84 resolving manifests 85 branchmerge: True, force: False, partial: False 86 ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8 87 starting 4 threads for background file closing (?) 88 preserving test.txt for resolve of test.txt 89 test.txt: versions differ -> m (premerge) 90 picked tool ':merge' for test.txt (binary False symlink False changedelete False) 91 merging test.txt 92 my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 93 test.txt: versions differ -> m (merge) 94 picked tool ':merge' for test.txt (binary False symlink False changedelete False) 95 my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118 96 warning: conflicts while merging test.txt! (edit, then use 'hg resolve --mark') 97 0 files updated, 0 files merged, 0 files removed, 1 files unresolved 98 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon 99 [1] 100 101 $ cat test.txt 102 one 103 <<<<<<< working copy: 50c3a7e29886 - test: Merge 1 104 two-point-five 105 ======= 106 two-point-one 107 >>>>>>> merge rev: 40d11a4173a8 - test: two -> two-point-one 108 three 109 110 $ hg debugindex test.txt 111 rev linkrev nodeid p1 p2 112 0 0 01365c4cca56 000000000000 000000000000 113 1 1 7b013192566a 01365c4cca56 000000000000 114 2 2 8fe46a3eb557 01365c4cca56 000000000000 115 3 3 fc3148072371 7b013192566a 8fe46a3eb557 116 4 4 d40249267ae3 8fe46a3eb557 000000000000 117 118 $ hg log 119 changeset: 4:40d11a4173a8 120 tag: tip 121 parent: 2:96b70246a118 122 user: test 123 date: Thu Jan 01 00:00:00 1970 +0000 124 summary: two -> two-point-one 125 126 changeset: 3:50c3a7e29886 127 parent: 1:d1e159716d41 128 parent: 2:96b70246a118 129 user: test 130 date: Thu Jan 01 00:00:00 1970 +0000 131 summary: Merge 1 132 133 changeset: 2:96b70246a118 134 parent: 0:b1832b9d912a 135 user: test 136 date: Thu Jan 01 00:00:00 1970 +0000 137 summary: Numbers as words 138 139 changeset: 1:d1e159716d41 140 user: test 141 date: Thu Jan 01 00:00:00 1970 +0000 142 summary: 2 -> 2.5 143 144 changeset: 0:b1832b9d912a 145 user: test 146 date: Thu Jan 01 00:00:00 1970 +0000 147 summary: Initial 148 149 150 $ cd .. 151