Show More
@@ -356,13 +356,23 b' def manifestmerge(repo, p1, p2, pa, over' | |||
|
356 | 356 | if not f2: |
|
357 | 357 | f2 = f |
|
358 | 358 | fa = f |
|
359 |
a, |
|
|
360 | if ((a^b) | (a^c)) ^ a: | |
|
361 |
return |
|
|
362 | a, b, c = ma.linkf(fa), m1.linkf(f), m2.linkf(f2) | |
|
363 | if ((a^b) | (a^c)) ^ a: | |
|
364 | return 'l' | |
|
365 | return '' | |
|
359 | a, m, n = ma.flags(fa), m1.flags(f), m2.flags(f2) | |
|
360 | if m == n: # flags agree | |
|
361 | return m # unchanged | |
|
362 | if m and n: # flags are set but don't agree | |
|
363 | if not a: # both differ from parent | |
|
364 | r = repo.ui.prompt( | |
|
365 | _(" conflicting flags for %s\n" | |
|
366 | "(n)one, e(x)ec or sym(l)ink?") % f, "[nxl]", "n") | |
|
367 | return r != "n" and r or '' | |
|
368 | if m == a: | |
|
369 | return n # changed from m to n | |
|
370 | return m # changed from n to m | |
|
371 | if m and m != a: # changed from a to m | |
|
372 | return m | |
|
373 | if n and n != a: # changed from a to n | |
|
374 | return n | |
|
375 | return '' # flag was cleared | |
|
366 | 376 | |
|
367 | 377 | def act(msg, m, f, *args): |
|
368 | 378 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) |
@@ -386,31 +396,31 b' def manifestmerge(repo, p1, p2, pa, over' | |||
|
386 | 396 | if partial and not partial(f): |
|
387 | 397 | continue |
|
388 | 398 | if f in m2: |
|
399 | if overwrite or backwards: | |
|
400 | rflags = m2.flags(f) | |
|
401 | else: | |
|
402 | rflags = fmerge(f) | |
|
389 | 403 | # are files different? |
|
390 | 404 | if n != m2[f]: |
|
391 | 405 | a = ma.get(f, nullid) |
|
392 | 406 | # are we clobbering? |
|
393 | 407 | if overwrite: |
|
394 |
act("clobbering", "g", f, |
|
|
408 | act("clobbering", "g", f, rflags) | |
|
395 | 409 | # or are we going back in time and clean? |
|
396 | 410 | elif backwards and not n[20:]: |
|
397 |
act("reverting", "g", f, |
|
|
411 | act("reverting", "g", f, rflags) | |
|
398 | 412 | # are both different from the ancestor? |
|
399 | 413 | elif n != a and m2[f] != a: |
|
400 |
act("versions differ", "m", f, f, f, |
|
|
414 | act("versions differ", "m", f, f, f, rflags, False) | |
|
401 | 415 | # is remote's version newer? |
|
402 | 416 | elif m2[f] != a: |
|
403 |
act("remote is newer", "g", f, |
|
|
417 | act("remote is newer", "g", f, rflags) | |
|
404 | 418 | # local is newer, not overwrite, check mode bits |
|
405 |
elif |
|
|
406 |
act("update permissions", "e", f, |
|
|
419 | elif m1.flags(f) != rflags: | |
|
420 | act("update permissions", "e", f, rflags) | |
|
407 | 421 | # contents same, check mode bits |
|
408 |
elif m1.flags(f) != |
|
|
409 | # are we clobbering? | |
|
410 | # is remote's version newer? | |
|
411 | # or are we going back? | |
|
412 | if overwrite or fmerge(f) != m1.flags(f) or backwards: | |
|
413 | act("update permissions", "e", f, m2.flags(f)) | |
|
422 | elif m1.flags(f) != rflags: | |
|
423 | act("update permissions", "e", f, rflags) | |
|
414 | 424 | elif f in copied: |
|
415 | 425 | continue |
|
416 | 426 | elif f in copy: |
General Comments 0
You need to be logged in to leave comments.
Login now