Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 15637:7f01ad702405 stable
icasefs: use util.normcase() instead of str.lower() or os.path.normpath()
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 12 Dec 2011 17:10:19 +0900 |
parents | b0a88bda3381 |
children | 5402fd9dd13e d550168f11ce |
comparison
equal
deleted
inserted
replaced
15635:82f5e471792d | 15637:7f01ad702405 |
---|---|
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from node import nullid, nullrev, hex, bin | 8 from node import nullid, nullrev, hex, bin |
9 from i18n import _ | 9 from i18n import _ |
10 import scmutil, util, filemerge, copies, subrepo, encoding | 10 import scmutil, util, filemerge, copies, subrepo |
11 import errno, os, shutil | 11 import errno, os, shutil |
12 | 12 |
13 class mergestate(object): | 13 class mergestate(object): |
14 '''track 3-way merge state of individual files''' | 14 '''track 3-way merge state of individual files''' |
15 def __init__(self, repo): | 15 def __init__(self, repo): |
98 | 98 |
99 def _checkcollision(mctx): | 99 def _checkcollision(mctx): |
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 = encoding.lower(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 | 108 |