Commit Graph

10 Commits

Author SHA1 Message Date
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