sapling/tests/test-dirstate-symlink.t
Jun Wu c7e304d4e1 dirstate: fix symlink handling about unknown files
Summary:
Fix an issue where pathaudit failed (see [1] for what pathaudit does) files
showing up in "hg status" with fsmonitor enabled.

This is a problem with all dirstate implementation. Treestate makes it
easier exposed, as it merges "notefiles" with "nonnormalset", instead of
replacing an exisiting "notefiles" set.

[1]: https://www.mercurial-scm.org/repo/hg/rev/2cbd27f4f3c4

Reviewed By: DurhamG

Differential Revision: D8721020

fbshipit-source-id: 7c6c8c2f202c0da4c3eeee3c9b1ce10bf7970dd8
2018-07-03 05:50:52 -07:00

44 lines
557 B
Perl

#require symlink
#testcases v0 v1 v2
#if v0
$ setconfig format.dirstate=0
#endif
#if v1
$ setconfig format.dirstate=1
#endif
#if v2
$ setconfig format.dirstate=2
#endif
$ newrepo
$ mkdir a b
$ touch a/x
$ hg ci -m init -A a/x
Replace the directory with a symlink
$ mv a/x b/x
$ rmdir a
$ ln -s b a
"! a/x" should be shown, as it is implicitly removed
$ hg status
! a/x
? a
? b/x
$ hg ci -m rename -A .
adding a
removing a/x
adding b/x
"a/x" should not show up in "hg status", even if it exists
$ hg status