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

Re: space-efficient working copies

From: Russell Lewis <webmaster_at_villagersonline.com>
Date: 2007-12-05 03:56:15 CET

My solution, while a hack, is quite effective for my purposes: I
manually hard-link the two copies of the files together. (On Windows, I
use Cygwin to do this. It seems that Cygwin can create hard links on
Windows!)

This works well for files that will never change (for instance, I have
many mp3's and AskANinja episodes checked into SVN). Obviously, it
doesn't work with files that the user might modify. (When I, very
rarely, change these files, I have to delete one instance of the file
and actually make a copy of it.) I don't know whether it would cause
problems with "svn update" if one of the files actually changed.

For my mp3 collection, what I do (on Linux or Cygwin) is basically:
    svn co <URL>/mp3
    cd mp3
    find . -type f | grep -v svn | while read file1
       do
          file2=$(dirname $file1)/.svn/text-base/$(basename $file1).svn-base
          rm $file1
          ln $file2 $file1
       done

The above script will result in all of the files being marked readonly
(since the copies in .svn are set up that way by SVN) which is a nice
way to remind myself that I can't modify them until I break the link.

Also note that the above script only makes the links when it runs, so if
your repository adds new files, the new files will be stored in two
places until you hard link them, too.

Russ

Miller, Eric wrote:
> I have a scenario where we have many users working on or viewing the
> same set of data in the repository.
>
> This data is binary and when multiplied among the number of users the
> disk requirements can get onerous.
>
> I would really like to be able to implement a light-weight working copy
> using symbolic links that point to a common read-only area, replacing
> the links with editable data when locks/edit permissions are granted.
>
> Does anyone have any ideas if something like this is feasible in
> subversion?
>
> Thanks,
>
> Eric
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 5 03:56:46 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.