mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
4d151cc31d
Summary: Now that we can handle case folding, let's enable Rust status for those tests. We also need to migrate the tests to modernclient configs in the process. Note, there are two behavior changes here. 1. In the Python code, case insensitivity is handled by normalizing the user inputs (i.e. 'hg add SOME_FILE') and the files coming off the filesystem. The matchers themselves are not case insensitive. This causes some limitations, like where regex's or user inputs that are converted to regex's do not use case insensitive comparison. In the Rust code, the user input isn't normalized, and instead we do case insensitive matching. We then normalize the output of status before showing it to the user. This should provide better matching in the long-term, but right now there is an issue where if the Rust status logic has a Python matcher object, the Rust file system walker will handle non-normalized paths to the matcher (which isn't case insensitive and expects normalized paths) and therefore won't match. This can impact 'hg add foo/bar' when the case of foo in the treestate is FOO. The python matcher gets normalized to "FOO", then the Rust status logic hands it 'foo/bar', which fails to match and the 'hg add' does nothing. Using `hg add 'glob:**/bar'` can work around this. Once we move to rust regex matchers, the matcher will be case insensitive and this will stop being an issue. 2. In the Python code we also normalize directory names. So for instance, if you have "foo/bar" in your treestate, and "FOO/xxx" on disk, doing 'hg add FOO/xxx' will actually add "foo/xxx". This avoids accidentally creating different cased directories on disk. TreeState.normalize currently doesn't normalize directories, so this doesn't currently work. But, it turns out this didn't work well before either. In a Watchman repository the treestate is missing most files, so Python normalization also doesn't catch this case. In an Eden repository, Eden handles the normalization for you, and therefore this isn't an issue. So while the Rust status doesn't handle this, it's not a regression. Reviewed By: quark-zju Differential Revision: D40164595 fbshipit-source-id: 85a421a71ff2d5a451285f81f48c9b375a786d65
16 lines
262 B
Perl
16 lines
262 B
Perl
#require fsmonitor icasefs
|
|
|
|
(Run this test using HGFSMONITOR_TESTS=1)
|
|
|
|
Updating across a rename
|
|
|
|
$ configure modernclient
|
|
$ newclientrepo
|
|
|
|
$ echo >> a
|
|
$ hg commit -Aqm "add a"
|
|
$ hg mv a A
|
|
$ hg commit -qm "move a to A"
|
|
$ hg up -q '.^'
|
|
$ hg status
|