Subversion

Parses subversion’s INI files

Authors

Marc Fournier marc.f.nosp@m.ournier@camptoc.nosp@m.amp.com Raphael Pinson raphael.nosp@m..pinson@camptoc.nosp@m.amp.com

Summary
SubversionParses subversion’s INI files
LicenseThis file is licenced under the LGPL v2+, like the rest of Augeas.
ExamplesThe Test_Subversion file contains various examples and tests.
INI File settingssubversion only supports comments starting with “#”
comment
emptyAn empty line or a non-indented empty comment
sep
ENTRYsubversion doesn’t support indented entries
comma_list_re
space_list_re
std_re
entry_stdA standard entry Similar to a IniFile.entry_multiline_nocomment entry, but allows ‘;’
entry
TITLEsubversion doesn’t allow anonymous entries (outside sections)
title
recordUse the non-indented empty
LENS & FILTER
lns
filter

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

let comment = IniFile.comment_noindent "#" "#"

empty

let empty = IniFile.empty_noindent

An empty line or a non-indented empty comment

sep

let sep = IniFile.sep IniFile.sep_default IniFile.sep_default

ENTRY

subversion doesn’t support indented entries

comma_list_re

let comma_list_re = "password-stores"

space_list_re

let space_list_re = "global-ignores" | "preserved-conflict-file-exts"

std_re

let std_re = /[^ \t\r\n\/=#]+/ - (comma_list_re | space_list_re)

entry_std

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 ‘;’

entry

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]+/ " ")

TITLE

subversion doesn’t allow anonymous entries (outside sections)

title

let title = IniFile.title IniFile.entry_re

record

let record = IniFile.record_noempty title (entry|empty)

Use the non-indented empty

LENS & FILTER

lns

let lns = IniFile.lns record comment

filter

Provides unit tests and examples for the Subversion lens.
let comment = IniFile.comment_noindent "#" "#"
let empty = IniFile.empty_noindent
An empty line or a non-indented empty comment
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)
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_multiline_nocomment (kw:regexp) (sep:lens) (comment:lens) = entry_multiline_generic (key kw) sep comment_re comment eol
Generic multiline INI File entry without an end-of-line comment
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
let record = IniFile.record_noempty title (entry|empty)
Use the non-indented empty
let lns = IniFile.lns record comment
Close