Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 15674:7b7f03502b5a
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 16 Dec 2011 19:05:59 -0600 |
parents | 5402fd9dd13e d550168f11ce |
children | 0bd17a4bed88 |
comparison
equal
deleted
inserted
replaced
15660:c7b0bedbb07a | 15674:7b7f03502b5a |
---|---|
94 f = foldf(fn) | 94 f = foldf(fn) |
95 if f in folded and mctx[folded[f]].cmp(wctx[f]): | 95 if f in folded and mctx[folded[f]].cmp(wctx[f]): |
96 raise util.Abort(_("untracked file in working directory differs" | 96 raise util.Abort(_("untracked file in working directory differs" |
97 " from file in requested revision: '%s'") % fn) | 97 " from file in requested revision: '%s'") % fn) |
98 | 98 |
99 def _checkcollision(mctx): | 99 def _checkcollision(mctx, wctx): |
100 "check for case folding collisions in the destination context" | 100 "check for case folding collisions in the destination context" |
101 folded = {} | 101 folded = {} |
102 for fn in mctx: | 102 for fn in mctx: |
103 fold = util.normcase(fn) | 103 fold = util.normcase(fn) |
104 if fold in folded: | 104 if fold in folded: |
105 raise util.Abort(_("case-folding collision between %s and %s") | 105 raise util.Abort(_("case-folding collision between %s and %s") |
106 % (fn, folded[fold])) | 106 % (fn, folded[fold])) |
107 folded[fold] = fn | 107 folded[fold] = fn |
108 | |
109 if wctx: | |
110 for fn in wctx: | |
111 fold = util.normcase(fn) | |
112 mfn = folded.get(fold, None) | |
113 if mfn and (mfn != fn): | |
114 raise util.Abort(_("case-folding collision between %s and %s") | |
115 % (mfn, fn)) | |
108 | 116 |
109 def _forgetremoved(wctx, mctx, branchmerge): | 117 def _forgetremoved(wctx, mctx, branchmerge): |
110 """ | 118 """ |
111 Forget removed files | 119 Forget removed files |
112 | 120 |
549 wc.status(unknown=True) # prime cache | 557 wc.status(unknown=True) # prime cache |
550 folding = not util.checkcase(repo.path) | 558 folding = not util.checkcase(repo.path) |
551 if not force: | 559 if not force: |
552 _checkunknown(wc, p2, folding) | 560 _checkunknown(wc, p2, folding) |
553 if folding: | 561 if folding: |
554 _checkcollision(p2) | 562 _checkcollision(p2, branchmerge and p1) |
555 action += _forgetremoved(wc, p2, branchmerge) | 563 action += _forgetremoved(wc, p2, branchmerge) |
556 action += manifestmerge(repo, wc, p2, pa, overwrite, partial) | 564 action += manifestmerge(repo, wc, p2, pa, overwrite, partial) |
557 | 565 |
558 ### apply phase | 566 ### apply phase |
559 if not branchmerge: # just jump to the new rev | 567 if not branchmerge: # just jump to the new rev |