PDA

View Full Version : Is Subversion Neccessary ?



Harold Mansfield
08-30-2009, 10:55 PM
I already looked it up, but I can't see the relevancy of what I would need to know it for.
It seems as if that having an SQL database is the same thing.
Can anyone shed some light on Subversion and it's relevant application ?

billbenson
08-31-2009, 12:28 AM
I'd never heard of it before, but It looks like a mirror database that is used when a team is working on an application so as not to damage the actual db with changes. Unless someone else know something more about it, it doesn't seem like something you need??

Revision control - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Revision_control)

bacterozoid
08-31-2009, 08:24 AM
I've used subversion a million times. It's most useful when you have a group of people that needs to share a bunch of files (could be documents or source code for some program).

The best way to describe it is to give an example:

Say you have 4 people working on a project. They each have their own computer. Say john edits clients.txt and wants his team to have the same list. Instead of emailing the document around, he commits it to a subversion repository. Now his team can update their computers and have the latest list.

Subversion also keeps all versions of files. That way if you mess something up bad, you can revert to an earlier version. This is most useful when programming.

In answer to your question, it is not the same as a SQL database. Databases are used for unintelligent data storage. They do not keep version histories and are just good at finding data. Subversion is for keeping track of files and is most useful in a collaborative setting or one where you want backups of all revisions of a document.

Edit: I'm not sure what business you're in, but if it's something like web design, it has the potential to be useful. Likely you go through revisions of graphics or site designs. Once you find one you like, you could commit it to a repository with the comment "I call this design: 'blue marker' and I like it". Then, if you decided to make some changes, you could do so. If it turns out you hate the changes you make, just a few clicks will return you to the original design.

rezzy
08-31-2009, 10:46 AM
So subversion and its competitors are versisioning software. So as baterozoid said, if mistakes are found, they can pull the previous version of the code without problem.

If you are working on development for sites, you might find subversion useful. I have not used it but have found some instances where having it would be a nice thing.

If you are looking to backup database, there are tools to manage that. If you host has cpanel, you can create database backups every so often. I have started adding this on my servers, I encountered an issue, where I downloaded and installed a Wordpress theme and it crashed my Wordpress install. So I had to restore all my information. Its also important when makig Wordpress updates. People have lost their hard work by not backing up data.

Harold Mansfield
08-31-2009, 11:21 AM
So subversion and its competitors are versisioning software. So as baterozoid said, if mistakes are found, they can pull the previous version of the code without problem.

If you are working on development for sites, you might find subversion useful. I have not used it but have found some instances where having it would be a nice thing.

If you are looking to backup database, there are tools to manage that. If you host has cpanel, you can create database backups every so often. I have started adding this on my servers, I encountered an issue, where I downloaded and installed a Wordpress theme and it crashed my Wordpress install. So I had to restore all my information. Its also important when makig Wordpress updates. People have lost their hard work by not backing up data.


Edit: I'm not sure what business you're in, but if it's something like web design, it has the potential to be useful. Likely you go through revisions of graphics or site designs. Once you find one you like, you could commit it to a repository with the comment "I call this design: 'blue marker' and I like it". Then, if you decided to make some changes, you could do so. If it turns out you hate the changes you make, just a few clicks will return you to the original design.

So let's say that I have a client that wants to use subversion to collaborate on wordpress configurations between departments..is this something that is hosted that I log into, or something that I need to download to access ?

It still seems like just a database back up, that acts like a system restore (that's the best way I can visualize it) so I assume who ever is the project lead, sets up the subversion and everyone involved has access to make changes ?
Are there any examples or demos that I can check out ?

bacterozoid
08-31-2009, 12:45 PM
Subversion runs on a server. Once installed, you need some sort of client to access it. If you use an IDE for development, it's likely it has some sort of subversion plugin. If not, there are other ways - I'm a fan of Tortoise SVN (http://tortoisesvn.tigris.org/). I know it works on Windows, and it's a matter of right clicking a folder and then pressing "Commit to Repository" to add my changes to the server.

Whoever sets up subversion on the server must configure usernames and passwords for everyone who wants to use it.

In a way it is a database backup tool, I suppose -but it's not automatic. You have to decide when you want to commit your changes.

Here's a video that might help explain it better. I didn't watch it all, but it seems simplistic enough. (http://www.youtube.com/watch?v=8wYiabh2hpM)

Here's a quick screencast of Tortoise SVN interacting with a Subversion server. (http://www.youtube.com/watch?v=EkLiDiVcmsI)

Harold Mansfield
08-31-2009, 02:29 PM
Subversion runs on a server. Once installed, you need some sort of client to access it. If you use an IDE for development, it's likely it has some sort of subversion plugin. If not, there are other ways - I'm a fan of Tortoise SVN (http://tortoisesvn.tigris.org/). I know it works on Windows, and it's a matter of right clicking a folder and then pressing "Commit to Repository" to add my changes to the server.

Whoever sets up subversion on the server must configure usernames and passwords for everyone who wants to use it.

In a way it is a database backup tool, I suppose -but it's not automatic. You have to decide when you want to commit your changes.

Here's a video that might help explain it better. I didn't watch it all, but it seems simplistic enough. (http://www.youtube.com/watch?v=8wYiabh2hpM)

Here's a quick screencast of Tortoise SVN interacting with a Subversion server. (http://www.youtube.com/watch?v=EkLiDiVcmsI)

Cool, thanks.
I'll check them out.

nighthawk
09-01-2009, 09:42 AM
Subversion has nothing to do with databases, although a database can be used to store the subversion data. I would stop thinking of Subversion as having anything to do with databases, as this will only confuse you. Subversion is an example of a Concurrent Versioning System (CVS), of which there are mnay others.

CVS's are designed as tools for programmers to allow multiple people to work on a project together. A CVS provides source code versioning and access restrictions to prevent people overwriting each others work.

Say you are working as part of a team to develop a CMS system. Without a CVS in place, you would probably opt to store all your files on a network drive, so they are accessible to all members of the team. Supposing Johnny opens up index.php in his editor, and starts making some changes. Just after he opens it, Eddie also opens it, makes some quick changes and then saves it. When Jonny is finished, he saves his file - and all of Eddies changes are overwritten.

One of the main purposes of a CVS is to avoid situations like this. You typically use a client tool to access the files stored in the CVS, sometimes these are integrated into the IDE, other times they are integrated into your file browser. before changing a file, you would "check out" the file - ie retrieve the latest copy from the CVS. Some CVS's will then lock the file, so noone else can work on it. Once done you check it back in, and it is unlocked so others can edit it. Other CVS's are a little smarter, the file isnt locked when you check it out, but instead when checked back in, a comparison between your file and the last revision is performed, and your changes are merged, allowing two people to work on a file simultaniously.

Another major feature is that every time you check a file back in, you are asked to write a description of what you changed - and the file is stored as a new version. This allows you to browse through a history of all changes made to a file, and revert back to old copies if a bug has found to be introduced by a change. Typically CVS's are linked to bug tracking systems, allowing each change to be tied to a tracker/bug report and vice versa.

CVS's are of most use for developing a product, and are essential when there is more than a handful of people on the project. With a product you typically need to release it in versions - with a CVS you can mark & label files - so you can eaisly identify which version of a file was used in version xx of the product. You can then easily do a report on what has changed between versions etc.

For a project like a website I am not sure if a CVS is quite so important, certainly the build labeling is of less use, but if there are still a few of you working on the project it is definately worthwhile to prevent people overwriting each others work.

the ability to view older revisions of a file is also a massive boost - numerous times I have had to do this to see where a bug was introduced, or just to check and see who changed a function and why.

bacterozoid
09-01-2009, 09:50 AM
Excellent description, nighthawk!

billbenson
09-01-2009, 10:51 AM
Excellent description, nighthawk!

I second that, good post Nighthawk.

nighthawk
09-01-2009, 12:57 PM
I second that, good post Nighthawk.

thanks - I really should start that blog - that would have made a good first article!

vangogh
09-07-2009, 04:31 PM
Speaking of blogs, I came across this post, The Ultimate Guide to Version Control for Designers (http://sixrevisions.com/project-management/the-ultimate-guide-to-version-control-for-designers/), and naturally thought of this thread.

The post is less versioning for developers as this thread has been discussing and more about versioning for designers, the visual files, etc. Since we don't get a lot of questions about versioning this thread seemed like a good place for the post. There is an overview of what versioning is at the top.

billbenson
09-08-2009, 03:01 AM
Interesting.

What do you do VG? It seems more targeted at corporate development with multiple people working on a multi file project.

I tend to date files ie index-jun0709.php. In particular, I do this when making a quick change to something like htaccess. I'm lousy at regular expressions and frequently want to go back.

I also tend to call the same file. Say I have a script that the first time through you fill out a form. Next time through you present the data for editing. Third time you insert or update the form. Rather than do this in three separate files, I call the same script. It has the drawback of calling larger scripts each time, but my sites tend to be low traffic so thats not to much of an issue. It certainly is easier to keep track of for maintenance down the road.

bacterozoid
09-08-2009, 08:16 AM
Interesting post, vangogh. I've never used anything except for SVN in the past, and probably won't be interested in changing, especially if a new version control system only has access through somebody else's server. I like to host my own :)

Bill, not a bad approach with calling one file to do multiple things. When I'm writing a web app, I tend to think of those as controllers. Sometimes each page has it's own controller...other times one controller is shared between multiple pages. It's usually worth doing it that way...although I'm not sure how that comment applies to the version control discussion.

billbenson
09-08-2009, 01:37 PM
What, are you accusing me of going off topic? :) I guess I drifted off. I worked all night...

vangogh
09-08-2009, 01:38 PM
Bill I don't do much versioning since it's just me working on the files. If I'm working on something I'll save a backup until I know the new changes are working. But for the most part I don't do any versioning. I do have my Mac backing up using Time Machine so I can go back in time and see how a file looked 2 weeks ago or 3 months ago.

Paper Shredder Clay
09-13-2009, 06:18 PM
I think version control is a great way to be sure you don't mess up and not have a way to revert back I'm still learning about it, but it beats have a million files names source1.ascx, source2.ascx. Saves time and organization.

avanidesigns
01-14-2011, 04:16 PM
Subversion is definitely cool if you have several people working out of a same directory... Subversion maintains a copy of the original(s). Also a life saver if you over-wrote a document and never saved the original... But is it necessary? Well, that depends on you.