[darcs-users] binary changes in interactive mode

David Roundy droundy at abridgegame.org
Wed Jun 16 11:05:56 UTC 2004


On Sun, Jun 13, 2004 at 02:05:57PM +0200, Matteo Vaccari wrote:
> Hi everybody,

Hello!

> One thing that I find confusing is why Darcs insists on showing me binary
> diffs, for instance when I do "darcs record" without the "-a" flag.  What
> is the use of that?  In most cases I checked in a new version of a .jar
> or a .dll.  There is nothing intelligible about the hex dump of a .jar
> file, that scrolls for a couple of minutes on my console before stopping.
> Wouldn't it be more useful to just ask "Confirm changes to binary file
> such-and-such?".  Am I missing something?

No, it is indeed rather silly.  The trouble is that I've avoided creating a
separate function to format a patch for the screen, so what you get on the
screen is identical (apart from color and escape characters) to what would
be stored in the patch file.

Fortunately, it has now occurred to me that I can use the same mechanism
that allows the color to be added when displayed on the screen to make part
of the patches not show up at all.  So I've implemented this, and now the
binary contents are not displayed.  It turned out (with Ian's Printer
module) to be much easier than I had feared! :)

Thanks for the suggestion!
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list