Show More
@@ -1,115 +1,165 b'' | |||
|
1 | 1 | $ mkdir t |
|
2 | 2 | $ cd t |
|
3 | 3 | $ hg init |
|
4 | 4 | |
|
5 | 5 | $ mkdir a |
|
6 | 6 | $ echo foo > a/a |
|
7 | 7 | $ echo bar > a/b |
|
8 | 8 | $ hg ci -Am "0" |
|
9 | 9 | adding a/a |
|
10 | 10 | adding a/b |
|
11 | 11 | |
|
12 | 12 | $ hg co -C 0 |
|
13 | 13 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 14 | $ hg mv a b |
|
15 | 15 | moving a/a to b/a |
|
16 | 16 | moving a/b to b/b |
|
17 | 17 | $ hg ci -m "1 mv a/ b/" |
|
18 | 18 | |
|
19 | 19 | $ hg co -C 0 |
|
20 | 20 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
21 | 21 | $ echo baz > a/c |
|
22 | 22 | $ echo quux > a/d |
|
23 | 23 | $ hg add a/c |
|
24 | 24 | $ hg ci -m "2 add a/c" |
|
25 | 25 | created new head |
|
26 | 26 | |
|
27 | 27 | $ hg merge --debug 1 |
|
28 | 28 | searching for copies back to rev 1 |
|
29 | 29 | unmatched files in local: |
|
30 | 30 | a/c |
|
31 | 31 | a/d |
|
32 | 32 | unmatched files in other: |
|
33 | 33 | b/a |
|
34 | 34 | b/b |
|
35 | 35 | all copies found (* = to merge, ! = divergent): |
|
36 | 36 | b/a -> a/a |
|
37 | 37 | b/b -> a/b |
|
38 | 38 | checking for directory renames |
|
39 | 39 | dir a/ -> b/ |
|
40 | 40 | file a/c -> b/c |
|
41 | 41 | file a/d -> b/d |
|
42 | 42 | resolving manifests |
|
43 | 43 | overwrite None partial False |
|
44 | 44 | ancestor f9b20c0d4c51 local ce36d17b18fb+ remote 397f8b00a740 |
|
45 | 45 | a/d: remote renamed directory to b/d -> d |
|
46 | 46 | a/c: remote renamed directory to b/c -> d |
|
47 | 47 | a/b: other deleted -> r |
|
48 | 48 | a/a: other deleted -> r |
|
49 | 49 | b/a: remote created -> g |
|
50 | 50 | b/b: remote created -> g |
|
51 | 51 | updating: a/a 1/6 files (16.67%) |
|
52 | 52 | removing a/a |
|
53 | 53 | updating: a/b 2/6 files (33.33%) |
|
54 | 54 | removing a/b |
|
55 | 55 | updating: a/c 3/6 files (50.00%) |
|
56 | 56 | moving a/c to b/c |
|
57 | 57 | updating: a/d 4/6 files (66.67%) |
|
58 | 58 | moving a/d to b/d |
|
59 | 59 | updating: b/a 5/6 files (83.33%) |
|
60 | 60 | getting b/a |
|
61 | 61 | updating: b/b 6/6 files (100.00%) |
|
62 | 62 | getting b/b |
|
63 | 63 | 4 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
64 | 64 | (branch merge, don't forget to commit) |
|
65 | 65 | |
|
66 | 66 | $ echo a/* b/* |
|
67 | 67 | a/* b/a b/b b/c b/d |
|
68 | 68 | $ hg st -C |
|
69 | 69 | M b/a |
|
70 | 70 | M b/b |
|
71 | 71 | A b/c |
|
72 | 72 | a/c |
|
73 | 73 | R a/a |
|
74 | 74 | R a/b |
|
75 | 75 | R a/c |
|
76 | 76 | ? b/d |
|
77 | 77 | $ hg ci -m "3 merge 2+1" |
|
78 | 78 | $ hg debugrename b/c |
|
79 | 79 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 |
|
80 | 80 | |
|
81 | 81 | $ hg co -C 1 |
|
82 | 82 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
83 | 83 | $ hg merge --debug 2 |
|
84 | 84 | searching for copies back to rev 1 |
|
85 | 85 | unmatched files in local: |
|
86 | 86 | b/a |
|
87 | 87 | b/b |
|
88 | 88 | b/d |
|
89 | 89 | unmatched files in other: |
|
90 | 90 | a/c |
|
91 | 91 | all copies found (* = to merge, ! = divergent): |
|
92 | 92 | b/a -> a/a |
|
93 | 93 | b/b -> a/b |
|
94 | 94 | checking for directory renames |
|
95 | 95 | dir a/ -> b/ |
|
96 | 96 | file a/c -> b/c |
|
97 | 97 | resolving manifests |
|
98 | 98 | overwrite None partial False |
|
99 | 99 | ancestor f9b20c0d4c51 local 397f8b00a740+ remote ce36d17b18fb |
|
100 | 100 | None: local renamed directory to b/c -> d |
|
101 | 101 | updating:None 1/1 files (100.00%) |
|
102 | 102 | getting a/c to b/c |
|
103 | 103 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
104 | 104 | (branch merge, don't forget to commit) |
|
105 | 105 | |
|
106 | 106 | $ echo a/* b/* |
|
107 | 107 | a/* b/a b/b b/c b/d |
|
108 | 108 | $ hg st -C |
|
109 | 109 | A b/c |
|
110 | 110 | a/c |
|
111 | 111 | ? b/d |
|
112 | 112 | $ hg ci -m "4 merge 1+2" |
|
113 | 113 | created new head |
|
114 | 114 | $ hg debugrename b/c |
|
115 | 115 | b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 |
|
116 | ||
|
117 | ||
|
118 | Second scenario with two repos: | |
|
119 | ||
|
120 | $ cd .. | |
|
121 | $ mkdir r1 | |
|
122 | $ cd r1 | |
|
123 | $ hg init | |
|
124 | $ mkdir a | |
|
125 | $ echo foo > a/f | |
|
126 | $ hg add a | |
|
127 | adding a/f | |
|
128 | $ hg ci -m "a/f == foo" | |
|
129 | $ cd .. | |
|
130 | ||
|
131 | $ hg clone r1 r2 | |
|
132 | updating to branch default | |
|
133 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
134 | $ cd r2 | |
|
135 | $ hg mv a b | |
|
136 | moving a/f to b/f | |
|
137 | $ echo foo1 > b/f | |
|
138 | $ hg ci -m" a -> b, b/f == foo1" | |
|
139 | $ cd .. | |
|
140 | ||
|
141 | $ cd r1 | |
|
142 | $ mkdir a/aa | |
|
143 | $ echo bar > a/aa/g | |
|
144 | $ hg add a/aa | |
|
145 | adding a/aa/g | |
|
146 | $ hg ci -m "a/aa/g" | |
|
147 | $ hg pull ../r2 | |
|
148 | pulling from ../r2 | |
|
149 | searching for changes | |
|
150 | adding changesets | |
|
151 | adding manifests | |
|
152 | adding file changes | |
|
153 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
|
154 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
155 | ||
|
156 | $ hg merge | |
|
157 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
158 | (branch merge, don't forget to commit) | |
|
159 | ||
|
160 | $ hg st -C | |
|
161 | M b/f | |
|
162 | A b/aa/g | |
|
163 | a/aa/g | |
|
164 | R a/aa/g | |
|
165 | R a/f |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now