[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Uncompress OpenDocument files before commit

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-09-25 03:22:13 CEST

On Sep 21, 2007, at 05:18, Jérôme Pouiller wrote:

> I'd like to add a hook (on server side) to uncompress OpenDocument
> files[1]
> before add and commit them and compress before to update them.
> Store them
> uncompressed would allow a better support of changes between
> revisions (more
> unitary). There is already a openoffice extention[2] to this stuff,
> but it
> work only on Linux and only with OpenOffice. Use of server side
> script seems
> better. Do you think it is a good idea?

It is not possible to do this automatically in Subversion. Whatever
comes in to the server (whatever you send via "svn commit") is what
needs to end up in the repository. All you can do in the pre-commit
hook is deny the commit entirely, if you want to deny it. Or you can
allow it. You cannot modify the data in transit.

To do what you want, you could write a wrapper script that you would
use on the client. Whenever you want to commit, you would instead
call your wrapper which would decompress the ODTs and then commit
them. And whenever you want to check out or update or export, you
would call another wrapper that checks out or updates or exports, and
then re-compresses the ODTs.

You could also install a pre-commit hook that rejects any commit of
normal compressed ODTs, if you want.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 25 03:24:16 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.