purge: abort with missing files avoiding problems with name-mangling fs
In a name mangling filesystem (e.g. a case insensitive one)
dirstate.walk() can yield filenames different from the ones
stored in the dirstate. This already confuses the status and
add commands, but with purge this may cause data loss.
To prevent this purge refuses to work if there are missing
files and has a 'force' option if the user knows it is safe.
Even with the force option purge checks if any of the missing
files is still available in the working dir: if so there
may be some problem with the underlying filesystem, so it
unconditionally aborts.
adding a
adding b
adding dir.h/foo
adding t.h
adding t/b
adding t/e.h
adding t/x
hg locate a
a
locate succeeded
hg locate NONEXISTENT
locate failed
hg locate
a
b
dir.h/foo
t.h
t/b
t/e.h
t/x
hg locate a
hg locate NONEXISTENT
hg locate relpath:NONEXISTENT
hg locate
b
dir.h/foo
t.h
t/b
t/e.h
t/x
hg locate -r 0 a
a
hg locate -r 0 NONEXISTENT
hg locate -r 0 relpath:NONEXISTENT
hg locate -r 0
a
b
dir.h/foo
t.h
t/b
t/e.h
t/x
% -I/-X with relative path should work
hg locate
b
dir.h/foo
t.h
t/b
t/e.h
t/x
hg locate -I ../t
t/b
t/e.h
t/x
hg locate t/**
t/b
t/e.h
t/x
hg locate b
../b
../t/b
hg locate *.h
../t.h
../t/e.h
hg locate path:t/x
../t/x
hg locate re:.*\.h$
../t.h
../t/e.h
hg locate -r 0 b
../b
../t/b
hg locate -r 0 *.h
../t.h
../t/e.h
hg locate -r 0 path:t/x
../t/x
hg locate -r 0 re:.*\.h$
../t.h
../t/e.h