Mercurial > hg
comparison mercurial/merge.py @ 5695:1ce185f3c640
merge with crew-stable
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 26 Dec 2007 23:03:32 +0100 |
parents | 78a6b985882f 840e2b315c1f |
children | 9cedc3fbbebb |
comparison
equal
deleted
inserted
replaced
5694:e9f1a1ccd51b | 5695:1ce185f3c640 |
---|---|
68 "check for collisions between unknown files and files in mctx" | 68 "check for collisions between unknown files and files in mctx" |
69 man = mctx.manifest() | 69 man = mctx.manifest() |
70 for f in wctx.unknown(): | 70 for f in wctx.unknown(): |
71 if f in man: | 71 if f in man: |
72 if mctx.filectx(f).cmp(wctx.filectx(f).data()): | 72 if mctx.filectx(f).cmp(wctx.filectx(f).data()): |
73 raise util.Abort(_("untracked local file '%s' differs" | 73 raise util.Abort(_("untracked file in working directory differs" |
74 " from remote version") % f) | 74 " from file in requested revision: '%s'") |
75 % f) | |
75 | 76 |
76 def checkcollision(mctx): | 77 def checkcollision(mctx): |
77 "check for case folding collisions in the destination context" | 78 "check for case folding collisions in the destination context" |
78 folded = {} | 79 folded = {} |
79 for fn in mctx.manifest(): | 80 for fn in mctx.manifest(): |
420 act("local moved to " + f2, "m", | 421 act("local moved to " + f2, "m", |
421 f, f2, f, fmerge(f, f2, f2), False) | 422 f, f2, f, fmerge(f, f2, f2), False) |
422 elif f in ma: | 423 elif f in ma: |
423 if n != ma[f] and not overwrite: | 424 if n != ma[f] and not overwrite: |
424 if repo.ui.prompt( | 425 if repo.ui.prompt( |
425 (_(" local changed %s which remote deleted\n") % f) + | 426 _(" local changed %s which remote deleted\n" |
426 _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("d"): | 427 "use (c)hanged version or (d)elete?") % f, |
428 _("[cd]"), _("c")) == _("d"): | |
427 act("prompt delete", "r", f) | 429 act("prompt delete", "r", f) |
428 else: | 430 else: |
429 act("other deleted", "r", f) | 431 act("other deleted", "r", f) |
430 else: | 432 else: |
431 # file is created on branch or in working directory | 433 # file is created on branch or in working directory |
453 elif f in ma: | 455 elif f in ma: |
454 if overwrite or backwards: | 456 if overwrite or backwards: |
455 act("recreating", "g", f, m2.flags(f)) | 457 act("recreating", "g", f, m2.flags(f)) |
456 elif n != ma[f]: | 458 elif n != ma[f]: |
457 if repo.ui.prompt( | 459 if repo.ui.prompt( |
458 (_("remote changed %s which local deleted\n") % f) + | 460 _("remote changed %s which local deleted\n" |
459 _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("k"): | 461 "use (c)hanged version or leave (d)eleted?") % f, |
462 _("[cd]"), _("c")) == _("c"): | |
460 act("prompt recreating", "g", f, m2.flags(f)) | 463 act("prompt recreating", "g", f, m2.flags(f)) |
461 else: | 464 else: |
462 act("remote created", "g", f, m2.flags(f)) | 465 act("remote created", "g", f, m2.flags(f)) |
463 | 466 |
464 return action | 467 return action |