Show More
@@ -192,7 +192,7 b' def manifestmerge(repo, p1, p2, pa, over' | |||
|
192 | 192 | |
|
193 | 193 | action = [] |
|
194 | 194 | |
|
195 |
def act(msg, |
|
|
195 | def act(msg, m, f, *args): | |
|
196 | 196 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) |
|
197 | 197 | action.append((f, m) + args) |
|
198 | 198 | |
@@ -210,43 +210,43 b' def manifestmerge(repo, p1, p2, pa, over' | |||
|
210 | 210 | a = ma.get(f, nullid) |
|
211 | 211 | # are both different from the ancestor? |
|
212 | 212 | if not overwrite and n != a and m2[f] != a: |
|
213 |
act("versions differ", |
|
|
213 | act("versions differ", "m", f, fmerge(f)) | |
|
214 | 214 | # are we clobbering? |
|
215 | 215 | # is remote's version newer? |
|
216 | 216 | # or are we going back in time and clean? |
|
217 | 217 | elif overwrite or m2[f] != a or (backwards and not n[20:]): |
|
218 |
act("remote is newer", |
|
|
218 | act("remote is newer", "g", f, m2.execf(f)) | |
|
219 | 219 | # local is newer, not overwrite, check mode bits |
|
220 | 220 | elif fmerge(f) != m1.execf(f): |
|
221 |
act("update permissions", |
|
|
221 | act("update permissions", "e", f, m2.execf(f)) | |
|
222 | 222 | # contents same, check mode bits |
|
223 | 223 | elif m1.execf(f) != m2.execf(f): |
|
224 | 224 | if overwrite or fmerge(f) != m1.execf(f): |
|
225 |
act("update permissions", |
|
|
225 | act("update permissions", "e", f, m2.execf(f)) | |
|
226 | 226 | elif f in copy: |
|
227 | 227 | f2 = copy[f] |
|
228 | 228 | if f in ma: # case 3,20 A/B/A |
|
229 | act("remote moved", | |
|
230 |
f |
|
|
229 | act("remote moved", "c", | |
|
230 | f, f2, f2, fmerge(f, f2, f), True) | |
|
231 | 231 | else: |
|
232 | 232 | if f2 in m1: # case 2 A,B/B/B |
|
233 | act("local copied", | |
|
234 |
f |
|
|
233 | act("local copied", "c", | |
|
234 | f, f2, f, fmerge(f, f2, f2), False) | |
|
235 | 235 | else: # case 4,21 A/B/B |
|
236 | act("local moved", | |
|
237 |
f |
|
|
236 | act("local moved", "c", | |
|
237 | f, f2, f, fmerge(f, f2, f2), False) | |
|
238 | 238 | elif f in ma: |
|
239 | 239 | if n != ma[f] and not overwrite: |
|
240 | 240 | if repo.ui.prompt( |
|
241 | 241 | (_(" local changed %s which remote deleted\n") % f) + |
|
242 | 242 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("d"): |
|
243 |
act("prompt delete", |
|
|
243 | act("prompt delete", "r", f) | |
|
244 | 244 | else: |
|
245 |
act("other deleted", |
|
|
245 | act("other deleted", "r", f) | |
|
246 | 246 | else: |
|
247 | 247 | # file is created on branch or in working directory |
|
248 | 248 | if (overwrite and n[20:] != "u") or (backwards and not n[20:]): |
|
249 |
act("remote deleted", |
|
|
249 | act("remote deleted", "r", f) | |
|
250 | 250 | |
|
251 | 251 | for f, n in m2.iteritems(): |
|
252 | 252 | if partial and not partial(f): |
@@ -258,17 +258,17 b' def manifestmerge(repo, p1, p2, pa, over' | |||
|
258 | 258 | if f2 not in m2: # already seen |
|
259 | 259 | continue |
|
260 | 260 | # rename case 1, A/A,B/A |
|
261 |
act("remote copied", |
|
|
261 | act("remote copied", "c", f2, f, f, fmerge(f2, f, f2), False) | |
|
262 | 262 | elif f in ma: |
|
263 | 263 | if overwrite or backwards: |
|
264 |
act("recreating", |
|
|
264 | act("recreating", "g", f, m2.execf(f)) | |
|
265 | 265 | elif n != ma[f]: |
|
266 | 266 | if repo.ui.prompt( |
|
267 | 267 | (_("remote changed %s which local deleted\n") % f) + |
|
268 | 268 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("k"): |
|
269 |
act("prompt recreating", |
|
|
269 | act("prompt recreating", "g", f, m2.execf(f)) | |
|
270 | 270 | else: |
|
271 |
act("remote created", |
|
|
271 | act("remote created", "g", f, m2.execf(f)) | |
|
272 | 272 | |
|
273 | 273 | return action |
|
274 | 274 |
General Comments 0
You need to be logged in to leave comments.
Login now