Commit Graph

14 Commits

Author SHA1 Message Date
Matt Mackall
3ad28905f6 tests: drop explicit $TESTDIR from executables
$TESTDIR is added to the path, so this is superfluous. Also,
inconsistent use of quotes means we might have broken on tests with
paths containing spaces.
2015-06-08 14:44:30 -05:00
John Coomes
310ded0ea2 add: use lexists so that broken symbolic links are added
This restores the add behavior prior to 83750c0d774f and matches the
behavior of addremove.
2014-12-03 14:33:29 -08:00
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05:00
Siddharth Agarwal
bc3c1061f7 manifestmerge: local unknown, remote created: don't traverse symlinks
To figure out what to do with locally unknown files, Mercurial attempts to read
them if they exist. When an attempt is made to read a file that exists but
traverses a symlink, Mercurial aborts.

With this patch, we first ensure that the file doesn't traverse a symlink
before opening it. This is fine because a file being "remote created" means the
symlink doesn't exist remotely, which means it will be deleted in the apply
phase.
2013-05-08 14:11:01 -07:00
Durham Goode
b4e95fed5e dirstate: walk returns None for files that have a symlink in their path
Previously dirstate.walk would return a stat object for files in the dmap
that have a symlink to a directory in their path.  Now it will return None
to indicate that they are no longer considered part of the repository. This
currently only affects walks that traverse the entire directory tree (ex:
hg status) and not walks that only list the contents of the dmap (ex: hg diff).

In a situation like this:
  mkdir foo && touch foo/a && hg commit -Am "a"
  mv foo bar
  ln -s bar foo

'hg status' will now show '! foo/a', whereas before it incorrectly considered
'foo/a' to be unchanged.

In addition to making 'hg status' report the correct information, this will
allow callers to dirstate.walk to not have to detect symlinks themselves,
which can be very expensive.
2013-02-04 14:27:15 -08:00
Mads Kiilerich
84f8ae3223 scmutil: localize and improve 'not under root' message 2013-01-18 01:24:29 +01:00
timeless@mozdev.org
f029229d67 spelling: nonexistent 2012-08-17 13:58:18 -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
Thomas Arendsen Hein
21bb7c4cdc tests: make tests work if directory contains special characters
With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".
2012-04-03 19:06:35 +02:00
Dan Villiom Podlaski Christiansen
6ee655e337 canonpath: allow canonicalization of non-existant paths
Such as a copy destination; see the added test.
2012-01-08 15:23:26 +01:00
Martin Geisler
3d112b3042 tests: added a short description to issue numbers
Many tests already had a short line to describe what IssueXXX is
about. I find that quite useful when reading a test.
2010-09-24 10:13:49 +02:00
Matt Mackall
08439e0f2d tests: add exit codes to unified tests 2010-09-16 17:51:32 -05:00
Nicolas Dumazet
a364338fdc tests: merge all 4 test-symlink* into test-symlinks 2010-08-12 23:22:25 +09:00
Nicolas Dumazet
a2e261b3b3 tests: unify test-symlinks 2010-08-12 20:08:02 +09:00