[darcs-users] annotate output (Was: machine-readable formats)

Max Battcher me at worldmaker.net
Sun Sep 5 19:01:49 UTC 2010


On 9/4/2010 9:20, Lele Gaifax wrote:
> In the latter case, maybe we could go with a mix of YAML and a custom
> microformat, taking advantage of the "multiple documents"[1] feature:
>
>      - hash: 20100903001327-fb03a-045b1923d4b1b1b432d3e3b03840101f4f9891e3
>        name: Remove redundant set -ev from tentative_revert.sh.
>        date: 2010-09-03 00:13:27 +0
>        author: Petr Rockai<me at mornfall.net>
>      - hash: 20100904030947-fb03a-fac657d51ee80c33488031d8bdcfab769aa7f83c
>        name: What a patch!
>        date: 2010-09-04T03:09:47Z
>        author: John Doe
>      - hash: 20100904151247-a433a-oac77ade86ab7772cbb1932acdffc65f11abcd81
>        name: Last atch
>        date: 2010-09-04T15:12:47Z
>        author: Lele
>      ---
>      1       First line of the file
>      3       second line, tweaked by Lele
>      2       third line, added by John
>
> Here I used a TAB to enhance readability, but it could be anything. I
> also used a one-based index, that seems appropriate bikeshedding :)
>
> ciao, lele.
>
> [1] http://www.yaml.org/spec/1.2/spec.html#id2800132

Interesting. Playing a little bit with it, using the partial hashes ideas:

045b19:
   hash: 20100903001327-fb03a-045b1923d4b1b1b432d3e3b03840101f4f9891e3
   name: Remove redundant set -ev from tentative_revert.sh.
   date: 2010-09-03 00:13:27 +0
   author: Petr Rockai<me at mornfall.net>
fac657:
   hash: 20100904030947-fb03a-fac657d51ee80c33488031d8bdcfab769aa7f83c
   name: What a patch!
   date: 2010-09-04T03:09:47Z
   author: John Doe
oac77a:
   hash: 20100904151247-a433a-oac77ade86ab7772cbb1932acdffc65f11abcd81
   name: Last atch
   date: 2010-09-04T15:12:47Z
   author: Lele
---
045b19	First line of the file
oac77a	second line, tweaked by Lele
fac657	third line, added by John
...

I'm still wondering if the second document may also be better in a YAML 
format of some sort... Another toy example:

- 045b19: |
   First line of file
- oac77a: |
   second line, tweaked by Lele
   third line, tweaked by Lele
- fac657: |
   man line, added by John

That doesn't seem that much worse than the existing human-readable 
annotate output...

--
--Max Battcher--
http://worldmaker.net


More information about the darcs-users mailing list