FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:21:27 +0900] rev 15673
merge: check filename case collision between changesets for branch merging
this patch makes branch merging abort when merged changesets have same
file in different case on case insensitive filesystem.
this patch does not prevent linear update which merges between target
and working contexts, because 'branchmerge' is False in such case.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:41 +0900] rev 15672
i18n: use encoding.lower/upper for encoding aware case folding
this patch uses encoding.lower/upper for case folding, because ones of
str can not fold case of non ascii characters correctly.
to avoid cyclic dependency and to encapsulate logic of normcase in
each platforms, this patch introduces encodinglower/encodingupper in
both posix/windows specific files.
this patch does not change implementation of normcase() in posix.py,
because we do not know the encoding of filenames on POSIX.
some "normcase()" are excluded from function wrap list in
hgext/win32mbcs.py, because they become encoding aware by this patch.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15671
windows: use upper() instead of lower() or os.path.normcase()
this patch uses upper() instead of lower() or os.path.normcase() for
case folding on Windows(NTFS), because lower-ing causes problems for
some languages on it.
see below for detail about problem of lower-ing:
https://blogs.msdn.com/b/michkap/archive/2005/01/16/353873.aspx
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15670
icasefs: avoid normcase()-ing in util.fspath() for efficiency
'dirstate._normalize()', the only caller of 'util.fspath()', has
already normcase()-ed path before invocation of it.
normcase()-ed root can be cached on dirstate side, too.
so, this patch changes 'util.fspath()' API specification to avoid
normcase()-ing in it.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15669
icasefs: use util.normcase() instead of lower() or os.path.normcase in fspath
this also avoids lower()-ing on each path components by reuse the path
normcase()-ed at beginning of function.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15668
dirstate: prevent useless util.fspath() invocation for '.'
at first of dirstate.walk() on case insensitive filesystem,
normalization of '.' causes util.fspath() invocation, but '.' is not
cached in it.
this invocation is not only useless, but also harmful: initial "hg
tag" causes creation of ".hgtags" file after dirstate.walk(), and
looking up ".hgtags" in cache will fail, because directory contents of
root is already cached at util.fspath() invocation for '.'.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15667
icasefs: consider as case sensitive if there is no counterevidence, for safety
for safety, this patch prevents case-less name from misleading into
case insensitivity, even though such names should not be used.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15666
pathauditor: switch normcase logic according to case sensitivity of filesystem
this patch applies 'util.normcase()' to audit path only on case
insensitive filesystem.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15665
pathauditor: preserve case in abort messages
this patch uses both plain and normcase()-ed pathes to preserve letter
case of path in abort messages.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Dec 2011 21:09:40 +0900] rev 15664
pathauditor: use normcase()-ed path for audit result cache
in current pathauditor implementation, un-normcase()-ed path is
stored into and compared with audit result cache.
this is not efficiency on case insensitive filesystem.