[darcs-devel] Adding comments in any place of the line
David Roundy
droundy at darcs.net
Tue Jan 9 15:27:22 PST 2007
On Tue, Jan 09, 2007 at 10:45:33AM -0200, Marco Túlio Gontijo e Silva wrote:
> Hello,
>
> I talked to kowey about this on the IRC yesterday, and he suggested me
> to talk to other developers.
>
> Reading the code I noticed that lines started with # are treated as
> comments in _darcs/prefs/defaults and in other prefs files. This is not
> in the documentation, so I think it should be.
>
> My suggestion is to add support for comments when the # are not the
> first character on the line. I wrote a small patch that implements it,
> and made a few tests (above).
>
> The point of this is that it's nice to be able to comment in the same
> lines of not comments:
>
> apply posthook chmod -R a+r * # Run every time a patch is recorded.
I can see that this can be nice, but I'd prefer to keep the rules simple
and simply document that lines starting with a '#' are comments.
We've been over this once regarding allowing shell-like quotes, so that
people could simply copy into defaults the string they would type in the
shell, and the conclusion was that by the time you've added all the escapes
needed, the behavior is too confusing to explain to users (e.g. when do
they need to escape '\\', '\'', '\"', etc.
For the same reasons, I'd prefer to just say that there's no escaping at
all, and everything after the flag (posthook, in your case) is the argument
to that flag. But if others support your idea, I could be convinced.
--
David Roundy
Department of Physics
Oregon State University
More information about the darcs-devel
mailing list