<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Aug 13, 2008 at 8:29 PM, David Lutterkort <span dir="ltr"><<a href="mailto:dlutter@redhat.com">dlutter@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wed, 2008-08-13 at 18:20 +0200, Raphael Pinson wrote:<br>
> # HG changeset patch<br>
> # User Raphael Pinson <<a href="mailto:raphink@gmail.com">raphink@gmail.com</a>><br>
> # Date 1218644422 -7200<br>
> # Node ID 0fecb892aefdeef53e5c73d7cfe2c862e1e79488<br>
> # Parent  77868db94cb316e09e7872cc3ab087a22ec9684c<br>
> Allow flags<br>
><br>
> diff -r 77868db94cb3 -r 0fecb892aefd lenses/inifile.aug<br>
> --- a/lenses/inifile.aug      Wed Aug 13 14:16:45 2008 +0200<br>
> +++ b/lenses/inifile.aug      Wed Aug 13 18:20:22 2008 +0200<br>
> @@ -41,7 +41,7 @@ let empty                = Util.empty<br>
><br>
>  (* Some implementations of INI file allow ":" as separator *)<br>
>  let entry_generic (kw:regexp) (sep:lens) (comment:lens)<br>
> -                    = [ key kw . sep . value_to_comment? . (comment|eol) ]<br>
> +                    = [ key kw . (sep . value_to_comment?)? . (comment|eol) ]<br>
>  let entry (kw:regexp)<br>
>                      = entry_generic kw value_sepwithcolon comment<br>
>  let entry_setcomment (kw:regexp) (comment:lens)<br>
<br>
</div>I have two issues with this patch:</blockquote><div><br>I can understand. I was not happy with it either and tried to find other ways before coming to this. I needed this patch for mysql.cnf, which is an INI File with flags, the only one I know so far, although I don't believe it is in the RFC.<br>
 <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">    1. it's now legal to drop the '=' in _any_ inifile - is there a way<br>

        to do this only for the files where a key all by itself is<br>
        legal ?</blockquote><div><br>I could declare the entry in mysql.cnf instead. Originally, I declared a flag entry in mysql.cnf and then called 'let record = IniFile.record (entry|flag)' but the typechecker complained that entry and flag could override (i.e. on put augeas wouldn't know if a field was a flag or an entry). I'd be happy to fix it within mysql.cnf though. For now, not applying this patch breaks mysql.aug only.<br>
 <br><br>Raphael<br><br></div></div></div>