Commit Graph

5 Commits

Author SHA1 Message Date
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05:00
Siddharth Agarwal
036b5d2663 localrepo.status: ignore empty symlink placeholders
A symlink's target should never be empty in normal use. Solaris and some BSDs
do allow empty symlinks to be created (with varying semantics on dereference),
but a symlink placeholder that started off as empty is either

- going to be empty, in which case ignoring it is fine, since it's unchanged, or
- going to not be empty, in which case this check is irrelevant.
2013-08-31 10:16:06 -07:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Mads Kiilerich
4838bfb2c4 tests: use 'hghave symlink' for tests using symlinks 2011-11-07 03:14:54 +01:00
Matt Mackall
788df2a72b windows: sanity-check symlink placeholders
On Windows, we store symlinks as plain files with the link contents.
Via user error or NFS/Samba assistance, these files often end up with
'normal' file contents. Committing these changes thus gives an
invalid symlink that can't be checked out on Unix.

Here we filter out any modified symlink placeholders that look
suspicious when computing status:

- more than 1K (looks more like a normal file)
- contain NULs (not allowed on Unix, probably a binary)
- contains \n (filenames can't contain \n, very unusual for symlinks,
  very common for files)
2011-10-23 16:32:27 -05:00