Commit Graph

5 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
3b929dfbb5 path_auditor: cache names of audited directories
We use a separate cache to avoid problems with

audit = path_auditor(repo.root)
audit("subrepo")
audit("subrepo/file")

whitelisting "subrepo" (which is fine) and then using the same whitelist
with "subrepo/file" (which is not fine).

Since we create a separate path_auditor for every path on the command line,
a "hg add dir/a dir/b dir/c" will still lstat dir 3 times just to audit
the paths.
2007-08-18 21:36:10 -03:00
Bryan O'Sullivan
1b98353d91 Make audit_path more stringent.
The following properties of a path are now checked for:

    - under top-level .hg
    - starts at the root of a windows drive
    - contains ".."
    - traverses a symlink (e.g. a/symlink_here/b)
    - inside a nested repository

If any of these is true, the path is rejected.

The check for traversing a symlink is arguably stricter than necessary;
perhaps we should be checking for symlinks that point outside the
repository.
2007-08-10 10:46:03 -07:00
Thomas Arendsen Hein
6274feab61 Fixed test output for not using the deprecated 'hg forget'. 2006-04-27 13:05:02 +02:00
Vadim Gelfer
184aae8b48 mark forget command as deprecated.
will be removed after 0.9 released.
2006-04-26 12:05:16 -07:00
Vadim Gelfer
16c52d7c61 support nested repositories.
mercurial will not recurse into a subdirectory that contains a .hg
directory. it is treated as a separate repository.
2006-03-31 17:00:09 -08:00