Parses subversion’s INI files
Marc Fournier marc.f@camptoc amp.com Raphael Pinson ournierraphael@camptoc amp.com .pinson
Subversion | Parses subversion’s INI files |
License | This file is licenced under the LGPL v2+, like the rest of Augeas. |
Examples | The Test_Subversion file contains various examples and tests. |
INI File settings | subversion only supports comments starting with “#” |
comment | |
empty | An empty line or a non-indented empty comment |
sep | |
ENTRY | subversion doesn’t support indented entries |
comma_list_re | |
space_list_re | |
std_re | |
entry_std | A standard entry Similar to a IniFile.entry_multiline_nocomment entry, but allows ‘;’ |
entry | |
TITLE | subversion doesn’t allow anonymous entries (outside sections) |
title | |
record | Use the non-indented empty |
LENS & FILTER | |
lns | |
filter |
The Test_Subversion file contains various examples and tests.
let entry_std = IniFile.entry_multiline_generic (key std_re) sep "#" comment IniFile.eol
A standard entry Similar to a IniFile.entry_multiline_nocomment entry, but allows ‘;’
let entry = let comma_list_re = "password-stores" in let space_list_re = "global-ignores" | "preserved-conflict-file-exts" in let std_re = /[^ \t\r\n\/=#]+/ - (comma_list_re | space_list_re) in entry_std | IniFile.entry_list_nocomment comma_list_re sep Rx.word Sep.comma | IniFile.entry_list_nocomment space_list_re sep Rx.no_spaces (del /(\r?\n)?[ \t]+/ " ")
let record = IniFile.record_noempty title (entry|empty)
Use the non-indented empty
let comment = IniFile.comment_noindent "#" "#"
An empty line or a non-indented empty comment
let empty = IniFile.empty_noindent
let sep = IniFile.sep IniFile.sep_default IniFile.sep_default
let comma_list_re = "password-stores"
let space_list_re = "global-ignores" | "preserved-conflict-file-exts"
let std_re = /[^ \t\r\n\/=#]+/ - (comma_list_re | space_list_re)
A standard entry Similar to a IniFile.entry_multiline_nocomment entry, but allows ‘;’
let entry_std = IniFile.entry_multiline_generic (key std_re) sep "#" comment IniFile.eol
Generic multiline INI File entry without an end-of-line comment
let entry_multiline_nocomment (kw:regexp) (sep:lens) (comment:lens) = entry_multiline_generic (key kw) sep comment_re comment eol
let entry = let comma_list_re = "password-stores" in let space_list_re = "global-ignores" | "preserved-conflict-file-exts" in let std_re = /[^ \t\r\n\/=#]+/ - (comma_list_re | space_list_re) in entry_std | IniFile.entry_list_nocomment comma_list_re sep Rx.word Sep.comma | IniFile.entry_list_nocomment space_list_re sep Rx.no_spaces (del /(\r?\n)?[ \t]+/ " ")
let title = IniFile.title IniFile.entry_re
Use the non-indented empty
let record = IniFile.record_noempty title (entry|empty)
let lns = IniFile.lns record comment