[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: Paul Lussier <pll_at_lanminds.com>
Date: 2003-02-24 21:52:47 CET

In a message dated: Mon, 24 Feb 2003 20:52:33 +0100
"SteveKing" said:

>But Subversion has properties. Now the 'main' file (I guess this
>would be the one with the actual text in it) would be the 'normal'
>file Subversion would use, all other files would just be properties
>of that file (ok, very big properties, but that wouldn't be a problem).
>
>> - create a subdir for each new OO file
>> - extract the archive into that directory
>> - add all the files to svn
>> - commit with an appropriate log message
>> - commit the archive with the original message

>That would become:
>- create subdir for the OO file
>- extract the archive into that subdir
>- add the main file to svn
>- add all other files as properties to the main file
>- move that file up one folder
>- commit
>--------------
>- svn writes such a file to the wc
>- extract all OO properties to the
> original OO files
>- gzip them

Huh. Why didn't I think of that? :) What a great idea, and *very*
creative use of props!

Of course, there is one wrinkle :(

Not only is an OO document an archive of files, but there is a
directory within that archive. Here's what I get when I unzip
(note 'unzip', *not* gunzip/gzip -d !!!)

$ unzip -l itd.sxw
Archive: itd.sxw
  Length Date Time Name
 -------- ---- ---- ----
       27 02-24-03 18:53 layout-cache
    30576 02-24-03 18:53 content.xml
    38491 02-24-03 18:53 styles.xml
     1335 02-24-03 18:53 meta.xml
     6926 02-24-03 18:53 settings.xml
      850 02-24-03 18:53 META-INF/manifest.xml
 -------- -------
    78205 6 files

Sooooo, we also have to account for a subdir of the newly created
subdir. I'm not sure how you would do that. Well, actually, maybe
we could just 'svn propset DIR/file-name' for each file in each subdir
(I'm assuming that the intention behind having the META-INF dir is to
contain more than one file, and that this use of subdirs could
expand).

So, the properties on each 'main' file would end up looking like:

        svn proplist foo.sxw
        layout-cache
        content.xml
        styles.xml
        meta.xml
        settings.xml
        META-INF/manifest.xml

That seems perfectly do-able. Maybe I'll code this up in my
"copious spare time" this week :)

-- 
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE
	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.
	 If you're not having fun, you're not doing it right!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 24 21:53:37 2003

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