views:

63

answers:

2

Me and two other guys recently started our own web development company. We each work from our homes and have decided we want to keep one central location for all of our files. These files include word documents, spreadsheets, client files, designs.. etc. Anything pertaining to our company. I have a pretty solid internet connection and a windows 2008 server box sitting at home so I set up a subversion repository.

Our file repository will look something like this.

Clients
   Company A
       Design (photoshop files, wireframes, concepts)
       Documents ( logins, quotes, proposals etc)
       Site Backups
   Company B
       Design 
       Documents 
       Site Backups
Prospects
   Company C
   Company D
Our Company
   Our Website
   Documents (contract, operating procudres)

My question is in regards to design files. The photoshop files that my designer works with range in sizes from 10mb to 100mb. I don't think we need to keep these files version-ed as this would eat up space incredibly fast. How do I go about controlling which files get version-ed, and which files are just stored. What I am thinking is that all documents need to be version-ed, and any files other then that should not be.

Any help would be appreciated, thanks!

Edit I am also curious whether this is the way to go. I just like this system since it keeps version of all my documents and at the same time. Also essentially I will have 3 backups in 3 different locations (3 local copies) so no need for backing it up. I am unsure of how svn would perform as purely a huge file repository.

+2  A: 

Use the svn:ignore property. Here's a quote explaining it:

The svn:ignore property contains a list of file patterns which certain Subversion operations will ignore. Perhaps the most commonly used special property, it works in conjunction with the global-ignores run-time configuration option (see the section called “Config”) to filter unversioned files and directories out of commands svn status, svn add, and svn import.

The rationale behind the svn:ignore property is easily explained. Subversion does not assume that every file or subdirectory in a working copy directory is intended for version control. Resources must be explicitly placed under Subversion's management using the svn add or svn import commands. As a result, there are often many resources in a working copy that are not versioned.

It's taken from the "Subversion book", the section on properties.


Note that the svn:ignore property can be set by filename wildcards (i.e. *.exe). You can add programmatic scripting (using hooks or SVN bindings for a programming language) to specify other rules - i.e. all files above 100MB are ignored. However, this may be somewhat dangerous. The choice is yours.

Eli Bendersky
awsome! this is exactly what I am looking for. do you think using subversion for what I am trying to do is appropriate?
Roeland
@Roeland: SVN is well suited for all kinds of files. The best methodology is to store only "source" files in it, and not store the "products" generated by tools (compilers, processors, etc.) from these sources. As long as you're doing that, you're just fine.
Eli Bendersky
if its "not versioned" will it still store in the repository. it looks like ignore just means it wont be stored.. am I right? the reason i say this is because my designer will work on files at his home, and then commit those design files to the repo. i want to be able to update my local copy to view those design files. currently when he has new design, he has to upload it to ftp.. then i have to download it manually. i am looking for this whole thing to automate that process a bit.
Roeland
@Roeland: ignored means it doesn't go into the repository, but SVN won't bug you about local copies in the sandbox
Eli Bendersky
so basically if my designer works on a 100mb photoshop file saves it, commits it, then works on it some more, saves it, commits it.. i will have 200 mb in the database at that point? this is assuming i am not ignoring these files.
Roeland
@Roeland: if it's a binary file, yes. If it's a text file, no.
Eli Bendersky
ok sounds good. i think for larger files what i will do is have the names of each file be different. older versions will just need to manually be deleted. ex. designer works on design1.psd, which he commits. he then works on it some more, and saves it as design2.psd. he will just need to delete design1.psd. thanks for all your help Eli :)
Roeland
@Roeland: just keep in mind that deleting it won't actually delete from the repository. SVN remembers forever (or how else would it restore an older revision for you, where this file wasn't yet deleted)
Eli Bendersky
interesting to know. i figured there would be a command to delete a file permanently.
Roeland
@Roeland: as you can read in the faq (http://subversion.apache.org/faq.html), there is no simple way at the moment. You can use SVN dump and load for that, but it isn't trivial
Eli Bendersky
A: 

Contrary to what you may believe, Subversion is actually very well suited to store binary files, and even does binary diffing between versions.

Filesize should not be a concern in your decision to version files or not. Whether you need version control should be the concern. Anything else is just shooting yourself in the foot.

Dave Van den Eynde
if you read my comments in eli's response you will kinda see what i am also using the versioning system for.
Roeland
No, I didn't read your comments because they weren't there yet when I posted my answer. Also, it doesn't change anything. You can't use SVN to just "store" something without versioning. That's not how it works. Don't use it as a simple fileserver.
Dave Van den Eynde