gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] [BUG] Re: False "binary" files


From: Jan Hudec
Subject: Re: [Gnu-arch-users] [BUG] Re: False "binary" files
Date: Sat, 12 Feb 2005 13:48:41 +0100
User-agent: Mutt/1.5.6+20040907i

On Fri, Feb 11, 2005 at 15:59:35 -0500, Aaron Bentley wrote:
> Anand Kumria wrote:
> >On Thu, 10 Feb 2005 21:34:02 +0100, Matthieu Moy wrote:
> >>Searching for preprecommit hook for example ...
> >
> >
> >A precommit hook would be useful to implement exploding OpenOffice (and
> >other compressed XML) files.
> 
> No, pre-precommit.  (aka prepare-commit)
> 
> The existing precommit hook is invoked too late in the commit process to 
> permit the working directory to be modified.
> 
> >You could use this to, unzip *.sxw into a directory.  Perform the commit.
> >Reverse the explosion by zipping the directory back to a .sxw file.
> >
> >Ugly but it should work.
> 
> Quite ugly, because every time you ran 'changes', it would show spurious 
> deletions for all the files in the sxw.  You'd have to explode every sxw 
> file before running 'changes' to avoid that.

In fact all this logic would be far better off in a smarter replacement
for diff+patch (which was also already discussed). If you give tla other
programs instead of diff and patch, that have compatible interface, but
do smart things with files like compressed xml, tla would work. The only
problem is, that your archive would not be readable for people who don't
use these tools.

I see two ways to go:
1) Extend diffutils to handle various cases like this and standartize
   use of these enhanced diffutils.
2) Implement support for multiple diffutils in tla, where the archive
   would somehow state which ones it needs and which ones should be used
   for different files in the archive.

Noone bothered enough to do either so far.

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec 
<address@hidden>

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]