Show More
@@ -106,6 +106,10 b' def manifestmerge(ui, m1, m2, ma, overwr' | |||
|
106 | 106 | |
|
107 | 107 | action = [] |
|
108 | 108 | |
|
109 | def act(msg, f, m, *args): | |
|
110 | ui.debug(" %s: %s -> %s\n" % (f, msg, m)) | |
|
111 | action.append((f, m) + args) | |
|
112 | ||
|
109 | 113 | # Filter manifests |
|
110 | 114 | if partial: |
|
111 | 115 | for f in m1.keys(): |
@@ -121,56 +125,44 b' def manifestmerge(ui, m1, m2, ma, overwr' | |||
|
121 | 125 | a = ma.get(f, nullid) |
|
122 | 126 | # are both different from the ancestor? |
|
123 | 127 | if not overwrite and n != a and m2[f] != a: |
|
124 | ui.debug(_(" %s versions differ, resolve\n") % f) | |
|
125 | action.append((f, "m", fmerge(f), n[:20], m2[f])) | |
|
128 | act("versions differ", f, "m", fmerge(f), n[:20], m2[f]) | |
|
126 | 129 | # are we clobbering? |
|
127 | 130 | # is remote's version newer? |
|
128 | 131 | # or are we going back in time and clean? |
|
129 | 132 | elif overwrite or m2[f] != a or (backwards and not n[20:]): |
|
130 |
|
|
|
131 | action.append((f, "g", m2.execf(f), m2[f])) | |
|
133 | act("remote is newer", f, "g", m2.execf(f), m2[f]) | |
|
132 | 134 | # local is newer, not overwrite, check mode bits |
|
133 | 135 | elif fmerge(f) != m1.execf(f): |
|
134 |
|
|
|
135 | action.append((f, "e", m2.execf(f))) | |
|
136 | act("update permissions", f, "e", m2.execf(f)) | |
|
136 | 137 | # contents same, check mode bits |
|
137 | 138 | elif m1.execf(f) != m2.execf(f): |
|
138 | 139 | if overwrite or fmerge(f) != m1.execf(f): |
|
139 |
|
|
|
140 | action.append((f, "e", m2.execf(f))) | |
|
140 | act("update permissions", f, "e", m2.execf(f)) | |
|
141 | 141 | del m2[f] |
|
142 | 142 | elif f in ma: |
|
143 | 143 | if n != ma[f] and not overwrite: |
|
144 | 144 | if ui.prompt( |
|
145 | 145 | (_(" local changed %s which remote deleted\n") % f) + |
|
146 | 146 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("d"): |
|
147 |
act |
|
|
147 | act("prompt delete", f, "r") | |
|
148 | 148 | else: |
|
149 |
|
|
|
150 | action.append((f, "r")) | |
|
149 | act("other deleted", f, "r") | |
|
151 | 150 | else: |
|
152 | 151 | # file is created on branch or in working directory |
|
153 | 152 | if (overwrite and n[20:] != "u") or (backwards and not n[20:]): |
|
154 |
|
|
|
155 | action.append((f, "r")) | |
|
156 | else: | |
|
157 | ui.debug(_("local created %s, keeping\n") % f) | |
|
153 | act("remote deleted", f, "r") | |
|
158 | 154 | |
|
159 | 155 | for f, n in m2.iteritems(): |
|
160 | 156 | if f in ma: |
|
161 | 157 | if overwrite or backwards: |
|
162 | ui.debug(_("local deleted %s, recreating\n") % f) | |
|
163 | action.append((f, "g", m2.execf(f), n)) | |
|
158 | act("recreating", f, "g", m2.execf(f), n) | |
|
164 | 159 | elif n != ma[f]: |
|
165 | 160 | if ui.prompt( |
|
166 | 161 | (_("remote changed %s which local deleted\n") % f) + |
|
167 | 162 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("k"): |
|
168 |
act |
|
|
169 | else: | |
|
170 | ui.debug(_("local deleted %s\n") % f) | |
|
163 | act("prompt recreating", f, "g", m2.execf(f), n) | |
|
171 | 164 | else: |
|
172 | ui.debug(_("remote created %s\n") % f) | |
|
173 | action.append((f, "g", m2.execf(f), n)) | |
|
165 | act("remote created", f, "g", m2.execf(f), n) | |
|
174 | 166 | |
|
175 | 167 | return action |
|
176 | 168 |
@@ -24,7 +24,7 b' merge: warning: conflicts during merge' | |||
|
24 | 24 | resolving manifests |
|
25 | 25 | overwrite None branchmerge True partial False |
|
26 | 26 | ancestor 451c744aabcc local a070d41e8360 remote faaea63e63a9 |
|
27 |
test.txt versions differ |
|
|
27 | test.txt: versions differ -> m | |
|
28 | 28 | merging test.txt |
|
29 | 29 | resolving test.txt |
|
30 | 30 | file test.txt: my fc3148072371 other d40249267ae3 ancestor 8fe46a3eb557 |
@@ -17,8 +17,8 b' summary: 1' | |||
|
17 | 17 | resolving manifests |
|
18 | 18 | overwrite False branchmerge False partial False |
|
19 | 19 | ancestor 33aaa84a386b local 802f095af299 remote 33aaa84a386b |
|
20 |
a versions differ |
|
|
21 |
remote created |
|
|
20 | a: versions differ -> m | |
|
21 | b: remote created -> g | |
|
22 | 22 | merging a |
|
23 | 23 | resolving a |
|
24 | 24 | file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2 |
@@ -33,7 +33,7 b' summary: 2' | |||
|
33 | 33 | resolving manifests |
|
34 | 34 | overwrite False branchmerge False partial False |
|
35 | 35 | ancestor 802f095af299 local 33aaa84a386b remote 33aaa84a386b |
|
36 |
remote deleted |
|
|
36 | b: remote deleted -> r | |
|
37 | 37 | removing b |
|
38 | 38 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
39 | 39 | changeset: 0:33aaa84a386b |
@@ -51,8 +51,8 b' summary: 1' | |||
|
51 | 51 | resolving manifests |
|
52 | 52 | overwrite False branchmerge False partial False |
|
53 | 53 | ancestor 33aaa84a386b local 802f095af299 remote 33aaa84a386b |
|
54 |
a versions differ |
|
|
55 |
remote created |
|
|
54 | a: versions differ -> m | |
|
55 | b: remote created -> g | |
|
56 | 56 | merging a |
|
57 | 57 | resolving a |
|
58 | 58 | file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2 |
@@ -102,8 +102,8 b' failed' | |||
|
102 | 102 | resolving manifests |
|
103 | 103 | overwrite False branchmerge True partial False |
|
104 | 104 | ancestor 802f095af299 local 030602aee63d remote 33aaa84a386b |
|
105 |
a versions differ |
|
|
106 |
b versions differ |
|
|
105 | a: versions differ -> m | |
|
106 | b: versions differ -> m | |
|
107 | 107 | merging a |
|
108 | 108 | resolving a |
|
109 | 109 | file a: my d730145abbf9 other 13e0d5f949fa ancestor b789fdd96dc2 |
@@ -42,9 +42,9 b' side2' | |||
|
42 | 42 | resolving manifests |
|
43 | 43 | overwrite True branchmerge False partial False |
|
44 | 44 | ancestor ded32b0db104 local 221226fb2bd8 remote 537353581d3d |
|
45 | remote deleted side2, clobbering | |
|
46 | remote deleted side1, clobbering | |
|
47 |
remote created |
|
|
45 | side2: remote deleted -> r | |
|
46 | side1: remote deleted -> r | |
|
47 | main: remote created -> g | |
|
48 | 48 | getting main |
|
49 | 49 | removing side1 |
|
50 | 50 | removing side2 |
General Comments 0
You need to be logged in to leave comments.
Login now