It's kind of an edge case, but something we use extensively where I work: source files coming from different sub-repositories are aggregated in the main repository using symlinks. Example:
deps/a/a.txt deps/b/b.txt src/a.txt --> deps/a/a.txt src/b.txt --> deps/b/b.txt
Right now, when you're doing
:Hg* on a symlinked file, it will fail because the file is not tracked, but its origin is (sometimes also in a subrepository).
The strategy to support that would be:
1) Dereference links using
2) Identify the root repository by doing
hg root in the link origin's parent