[PATCH 1 of 1] add: warn when adding a file that would cause a case-folding collision

Martin Geisler mg at lazybytes.net
Sat Apr 30 04:50:09 CDT 2011


Kevin Gessner <kevin at fogcreek.com> writes:

> # HG changeset patch
> # User Kevin Gessner <kevin at kevingessner.com>
> # Date 1304154504 -7200
> # Node ID 4421446fa1a4cae3fbb54642d8004a9615ea565a
> # Parent  92db9667d15ae7b5caf1a9653c2d45b5fdaf0e67
> add: warn when adding a file that would cause a case-folding collision
>
> On a case-sensitive file system, files can be added with names that
> differ only in case (a "case collision"). This would cause an error on
> case-insensitive filesystems. A warning is now given for such
> collisions:
>
>     $ touch file File
>     $ hg add file
>     $ hg add File
>     warning: possible case-folding collision for File

Nice -- that should go into a test case :)

Also, I was initially thinking that this would be combined with the new
ui.portablefilenames setting that is checked in scmutil.checkportable.

But that function does not know about the currently checked in files so
maybe that is a bad idea?

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list