Reputation: 65
I'm new to being a pure programmer/engineer (though I have worked with many through the years and performed 'as needed' coding). Now I find myself needing to setup a version control environment. I'm familiar with SVN, but would like to know if it has a 'feature' before going to the trouble of setting it up and determine what file structure to implement.
Within a project, I've several files that change frequently, but I do not want to keep prior versions as they would quickly gobble up disk space. Does SVN have a feature where you can set the property for a file (or folder) within the repository to only retain the latest version of a file? (Or maybe just the n last versions?)
If SVN does not have this feature, are there other version control systems that do?
Thanks in advance for your consideration of this question...
Upvotes: 3
Views: 92
Reputation: 30662
I guess that the file you are concerned about should not be stored in version-control sytsem at all. The common way to use Apache Subversion, or any other source control system is not to store files that are built from your own source files (e.g. autogenerated files, large binaries or disk images). In other words, if you build an executable, you should store it's sourcecode, not the compiled executable.
It's not clear what kind of file you are concerned about still. What is is the filetype and the size of the file?
If the file is textual then you don't have to worry about the repository size, see @ElmoVanKielmo's comment to your question. Subversion stores deltas between revisions of textual files very effectively.
If the file is large and binary then you still can store it in Subversion repository, however I wouldn't store files larger than 1GB in the repository.
Apache Subversion does not have such feature to automatically remove a file completely from the repository history. Subversion is designed to never lose information that exists in the repository. However, you can store the large file in dedicated branch and easily clean it up from time to time using repository history filtering.
Beware that disconnected/distributed version-control has it's shortcomings in regards of storing large binaries:
with Git, everyone who does git clone
will have to download the whole repository with all versions of the large binary file, so it can be time- and bandwidth- consuming. I'd say that Git is way less adapted for storing binaries than Subversion is.
...before going to the trouble of setting it up and determine what file structure to implement.
Installing and configuring Subversion server is not a trouble at all. You can look through the list of Apache Subversion Binary Packages to get one for your platform. Configure the server to expose your repositories over HTTP(S) (Apache HTTP Server) or svn:// (svnserve) protocols.
If you are on Windows, you may want to try VisualSVN Server that installs and configures the complete server package in a couple of clicks saving you a lot of time.
Upvotes: 2
Reputation: 41408
SVN keeps track of change sets, not whole files and no, you cannot delete them.
Extra Advice: I'd not worry about disk space for repos if I were you or maybe take some time reconsider why the files change so frequently that entire disk space is getting filled. Does this need version control? If so, you probably don't really want to blow away history.
Also, I'd recommend using a more modern version control tool like git or mercurial.
Here's a similar posts regarding clearing disk space with git:
As noted in a comment below, if you're this new to version control any of the above kung fu may likely result in broken feet ;)
Upvotes: 2