Mercurial > hg
view tests/test-casecollision.t @ 14068:04ce8fa1015d
add: notify 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 or error is now given for such collisions, depending on
the value of ui.portablefilenames ('warn', 'abort', or 'ignore'):
$ touch file File
$ hg add --config ui.portablefilenames=abort File
abort: possible case-folding collision for File
$ hg add File
warning: possible case-folding collision for File
author | Kevin Gessner <kevin@kevingessner.com> |
---|---|
date | Sat, 30 Apr 2011 12:39:46 +0200 |
parents | |
children | 524c560e2d32 |
line wrap: on
line source
run only on case-sensitive filesystems $ "$TESTDIR/hghave" no-icasefs || exit 80 test file addition with colliding case $ hg init repo1 $ cd repo1 $ echo a > a $ echo A > A $ hg add a $ hg st A a ? A $ hg add --config ui.portablefilenames=abort A abort: possible case-folding collision for A [255] $ hg st A a ? A $ hg add A warning: possible case-folding collision for A $ hg st A A A a $ hg forget A $ hg st A a ? A $ hg add --config ui.portablefilenames=no A $ hg st A A A a $ cd ..