What do you all think of the idea of tempfile: filters being given extra
substitutions?
There are some things I would like to do with filters, and it would be
really helpful to have a REPOINFO substituion. REPOINFO would be
substituted with the name of a temporary file containing \0 separated
strings with information about the repository file being operated on.
These would be the repository root, the directory relative to the
repository root, and the filename.
The reason for it to be done this way instead of with three separate
substitutions is to get around the crazy quoting rules on various
platforms.
If the tempfile: script did anything to the destination file, that file
would be replaced by the normal filter output. If it did anything to
any other file being managed by Mercurial, the results would be
undefined.
This would allow filters to be leveraged into a real meta-info system
for files by people who really wanted such a thing. Though, what I want
it for is for implementing something akin to svn:externals.
One problem with filters in general is that they can make a repository
that cannot be interpreted by anybody who doesn't have the right set of
filters. But, I'm also not so sure that filters should be a part of the
repository in any way. Hmmm...
Have fun (if at all possible),
--
"It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg." --- Thomas Jefferson
"Go to Heaven for the climate, Hell for the company." -- Mark Twain
-- Eric Hopper (hopper@xxxxxxxxxxxxxxx http://www.omnifarious.org/~hopper) --
pgp1tWbazVTlm.pgp
Description: PGP signature
|