On Wed, May 21, 2008 at 11:05 PM, Bo Peng <[EMAIL PROTECTED]> wrote: >> According to this, >> http://svn.haxx.se/users/archive-2008-03/0376.shtml >> svn handles binary diffs efficiently. I suspect that it would likewise >> handle zip -0 even more sensibly. Merging diffs may still be a problem. > > I think the issue here is not only about efficiency, but also about > usability of diff. When you modify a few words in a base64 bundled > .lyx file, 'svn diff' would be around these words, and you know what > had been changed. When you svn a zip bundled .lyx file, 'svn diff' is > likely to yield nothing informative.
Well diff -a somewhat informative, although very messy. I can clean the diff of two zip -0 files as follows: $ diff -a shfiles{,2}.zip | strings | grep '^[<>]' < top -n 1 | grep Cpu.s | grep -o '[^ ]*.id' #| sed s/[^0-9]//g > THIS IS BORKEN CHANGE top -n 1 | grep Cpu.s | grep -o '[^ ]*.id' #| sed > s/[^0-9]//g ar is gives nicer diffs: $ diff -a shfiles{,2}.zip | wc 30 104 1154 $ diff -a {1,2}.ar | wc 8 54 300 $ diff -a {1,2}.ar 164c164 < cooldown.sh/ 1211341443 1000 1000 100644 469 ` --- > cooldown.sh/ 1211382850 1000 1000 100644 491 ` 175c175 < top -n 1 | grep Cpu.s | grep -o '[^ ]*.id' #| sed s/[^0-9]//g --- > THIS IS BORKEN CHANGE top -n 1 | grep Cpu.s | grep -o '[^ ]*.id' #| sed > s/[^0-9]//g It seems as if we could probably even merge the diff if different sub files were changes. Still seems unsatisfying, as most likely in both zip/ar files the base .lyx file would have been changed. >> We could presumably save as zip if the user selects compressed, and save as >> base64 if the user does not select compression. Then zip/unzip states would >> be as the user expects from prior versions of lyx. > > This is not needed. In my proposal, plain text, base64 format is used > without compression, and our existing compression feature is used to > compress this file. Storing embedded files as base64 text in the zip file would eliminate most of the advantages of the zip format discussed. -- John C. McCabe-Dansted PhD Student University of Western Australia