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

Re: A simple (?) suggestion from a svn fan :)

From: William Uther <willu_at_cse.unsw.edu.au>
Date: 2003-02-25 03:22:08 CET

On Tuesday, February 25, 2003, at 04:45 AM, Alessandro Polverini wrote:

> So, I'm wondering: would it be possible to implement this behaviour in
> svn, when checking in files that have a certain property set:
> - gunzip the file
> - diff it with the previous (gunzipped) file
> - store differences (diff works well enough with xml files)

As has been already stated, this is not easy to implement. You get
diffy storage with subversion, but it is diffing gzipped files which is
not as efficient as diffing the uncompressed files.

It strikes me that your suggestion is a case of a more general pattern:

- there are files sitting in the working copy
- pass them through some filter to get the stuff you check in
- check in the filtered version

Then there is an inverse of the filter for checking out. This more
general form has many uses:

If the filter is gunzip/gzip (for checking in/out) then you get your
requested behaviour.
If the filter is "tar zc"/"tar zx" then you get opaque collections.
If the filter is "contract_keywords"/"expand_keywords" then you get
keyword expansion.
If the filter is "CRLF unconvert"/"CRLF convert" then you get LF
conversion.
If the filter is "convert text to UTF"/"unconvert text from UTF" then
you get file encoding conversion.
If the filter is "do nothing"/"add a symbolic link" then you can get
symbolic links.

This has been mentioned before (sometimes as client side scripts):

http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=198606

I also had a quick look at implementing it. I took a brief look at the
wc code (I was hoping to slip the generic filters in where keyword
expansion/lf conversion happens) before deciding I didn't have enough
time right then.

I just had a look for an issue on this and couldn't find one, so I
filed Issue #1152.

Have a nice day,

Will :-}

--
Dr William Uther                            National ICT Australia
Phone: +61 2 9385 6926             School of Computer Science and 
Engineering
Email: willu@cse.unsw.edu.au             University of New South Wales
Jabber: willu@jabber.cse.unsw.edu.au          Sydney, Australia
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 25 03:23:07 2003

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

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