Any path specified as an "ignore" value in the UI section of an hgrc file is interpreted as relative to the current directory, when it really makes a lot more sense (and is certainly more useful to repository maintainers) to make it relative to the hgrc file itself. This ensures more predictable and reliable behaviour. For example, consider the situation specified in http://mercurial.selenic.com/wiki/TipsAndTricks#Ignore_files_in_local_working_copy_only. The problem mentioned in the bracketed sentence (of having to specify the absolute path to a repo-specific user hgignore file) would be solved by the proposed relative path behaviour.
http://mercurial.markmail.org/thread/tvu7yhzsiywgkjzl
(In reply to comment #1) Interesting. I'm glad there's been support for this before. I'd imagine the change in code is a relatively straightforward one? As suggested in the mailing list posts, maybe we can change default behaviour so that relative paths are either with respect to the repository root, or the directory of the hgrc file. Alternatively, or in addition, one could specify something like an HG_DIR or HG_ROOT environment variable that can be used in hgrc files – this is akin to the GIT_DIR environment variable that performs the same role for Git repositories.
Fixed by http://selenic.com/repo/hg/rev/a04c7b74b3d5 Siddharth Agarwal <sid0@fb.com> ignore: resolve ignore files relative to repo root (issue4473) (BC) Previously these would be considered to be relative to the current working directory. That behavior is both undocumented and doesn't really make sense. There are two reasonable options for how to resolve relative paths: - relative to the repo root - relative to the config file Resolving these files relative to the repo root matches existing behavior with hooks. An earlier discussion about this is available at http://mercurial.markmail.org/thread/tvu7yhzsiywgkjzl. Thanks to Isaac Jurado <diptongo@gmail.com> for the initial patchset that spurred the discussion. (please test the fix)
Bulk testing -> fixed