Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 3785:6398ff7cb705
imported patch collision
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 04 Dec 2006 17:10:31 -0600 |
parents | b1eeaeb936ae |
children | 46abbed02b2d |
comparison
equal
deleted
inserted
replaced
3784:1427949b8f80 | 3785:6398ff7cb705 |
---|---|
65 for f in wctx.unknown(): | 65 for f in wctx.unknown(): |
66 if f in man: | 66 if f in man: |
67 if mctx.filectx(f).cmp(wctx.filectx(f).data()): | 67 if mctx.filectx(f).cmp(wctx.filectx(f).data()): |
68 raise util.Abort(_("untracked local file '%s' differs"\ | 68 raise util.Abort(_("untracked local file '%s' differs"\ |
69 " from remote version") % f) | 69 " from remote version") % f) |
70 | |
71 def checkcollision(mctx): | |
72 "check for case folding collisions in the destination context" | |
73 folded = {} | |
74 for fn in mctx.manifest(): | |
75 fold = fn.lower() | |
76 if fold in folded: | |
77 raise util.Abort(_("case-folding collision between %s and %s") | |
78 % (fn, folded[fold])) | |
79 folded[fold] = fn | |
70 | 80 |
71 def forgetremoved(wctx, mctx): | 81 def forgetremoved(wctx, mctx): |
72 """ | 82 """ |
73 Forget removed files | 83 Forget removed files |
74 | 84 |
458 | 468 |
459 ### calculate phase | 469 ### calculate phase |
460 action = [] | 470 action = [] |
461 if not force: | 471 if not force: |
462 checkunknown(wc, p2) | 472 checkunknown(wc, p2) |
473 if not util.checkfolding(repo.path): | |
474 checkcollision(p2) | |
463 if not branchmerge: | 475 if not branchmerge: |
464 action += forgetremoved(wc, p2) | 476 action += forgetremoved(wc, p2) |
465 action += manifestmerge(repo, wc, p2, pa, overwrite, partial) | 477 action += manifestmerge(repo, wc, p2, pa, overwrite, partial) |
466 | 478 |
467 ### apply phase | 479 ### apply phase |