[darcs-devel] [patch1420] --machine-readable flag for more parseable whatsnew

Guillaume Hoffmann bugs at darcs.net
Tue Jan 12 13:39:08 UTC 2016


New submission from Guillaume Hoffmann <guillaumh at gmail.com>:

This is work in progress and I'd appreciate comments and
opinions.

This patch adds the flag --machine-readable to whatsnew.

It implies --summary, and makes lines previously shown as:

    M f -N +M rP

now simply shown as:

    M f

Which makes parsing by third party tools much easier
(I'm adding Darcs support to geanyvc).

Another problem solved by this change, is that (very
improbably), a file can be named "f -N" or "f +M" and
be wrongly parsed before this patch.

Apart from this, I wondered if file moves should be
shown as one add and one remove, but this is more
complicated. In cases where we do the renames y -> z
and x -> y, we should maybe show:

    M y
    A z
    D x

This is what mercurial would do. But with Darcs this
seem to require some rewriting of the prim sequence
processed by whatsnew.. I don't think it's worth it.

Note that Bazaar (another system that really tracks
file renames) prefixes the file move lines with R (for
"rename") and the "delete" lines with D (in the output of
`bazaar status --short`). In Darcs these lines are recognizable
by the fact that they start with a space character.

1 patch for repository http://darcs.net:

patch 622d61ee9b425043c0667cf5c9877a27bad92455
Author: Guillaume Hoffmann <guillaumh at gmail.com>
Date:   Tue Jan 12 10:20:44 ART 2016
  * --machine-readable flag for more parseable whatsnew

----------
files: __machine_readable-flag-for-more-parseable-whatsnew.dpatch, patch-preview.txt, unnamed
messages: 18902
nosy: gh
status: needs-screening
title: --machine-readable flag for more parseable whatsnew

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1420>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 3818 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20160112/c49244ec/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: __machine_readable-flag-for-more-parseable-whatsnew.dpatch
Type: application/x-darcs-patch
Size: 17010 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20160112/c49244ec/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list