[darcs-users] machine-readable formats

Petr Rockai me at mornfall.net
Fri Sep 3 11:23:50 UTC 2010

Petr Rockai <me at mornfall.net> writes:

> patch: 20100903001327-fb03a-045b1923d4b1b1b432d3e3b03840101f4f9891e3.gz
>   name: The name of the patch (no newlines allowed by darcs here)
>   date: ...
>   salt: ...
>   comment: Some fancy comment
>   comment: that spans multiple lines
>   M -10 +3: some_file.txt
>   M -8 +10: some file\nwith newlines and spaces in it
> I don't know if the format has a name, but it's basically
> /(^patch: [0-9a-f-]{61}\.gz\n  name: ([^\n]*)\n  date: ([^\n]*)\n[...])*/
> You can add "^\n" as a separator between patches to make it even easier
> to process.

Oh, and with blank-line separators, we can get rid of the indents too,
which makes the language even simpler.

... OK OK, I will stop talking to myself and go do some real-worldly
stuff now.

More information about the darcs-users mailing list