Revision Control Software

Started by Matthew Needham, July 01, 2010, 11:25:41 AM

Previous topic - Next topic

Matthew Needham

Has anyone had any good experiences using revision control software for FireFly projects? I'm working on a project with one other person and it seems like it might streamline the coordination of our efforts, but I've never used any before.

Brian Chirgwin

I'd recommend Mecurial for several reasons. I use SVN now, but have plans to move.

1. Useful for remote developers. Each developer has a copy of the repository. Each developer can check in/out against there own repository. This makes it possible to check in each changes that aren't working and have them under source control.

2. Once a develop has a working version, it can be pushed to the repository for other developers to download.

3. Since each developer as a copy of the repository there is no central location to backup. Each developer has a complete copy, so just backup your machine and you have a backup of the repository.

Here is a good intro by Joel Spolsky http://hginit.com/

The one thing preventing from a move right now is SVN:Externals. I have code that I use in multiple projects. This code is an external project, but under version control in all projects. Change the code in any project and changes are committed and available for updates to all projects. Mercurial has added a similar feature, but it is beta right now.  Just giving it a little more time.





David Kenny

Brian,

You use the word "I" (as opposed to "we") all over in your post, but all three of the reasons you submitted refer to multiple developers.  Please clarify for me if the reason you are switching is for better multi-developer support?  And, are there other reasons you did not include in your post?

I have used SVN but have no need for the multiple developer support.  I did a little research after reading your post and found TortoiseHG is available for use with Mercurial.  I use TortoiseSVN with SVN for the GUI/Windows integration and to find TortoiseHG makes switching even possible for me as I am not to fond of command-line-only revision control.

Please, do let us know how it goes when you make the switch. 

Thanks,

David Kenny

John Messingham

I have used FtpVC (http://www.prestosoft.com/fvc_screenshots.asp) in the past and found it to be very useful. I used it as it does not require any server side software.
Many Thanks
John Messingham
http://www.jmds.co.uk

Brian Chirgwin

You're correct. I work on single developer project more than multi-developer projects. I do use multi-developer features though.

I have installed Mercurial and have done some tests and like what I see so far and recommend it based on the testing.

Let's say I have project A0 (0 being the repository). In SVN I can checkout A0, make some changes, once working check in. I would not check in code that didn't work as this would break other developers performing a checkout.  The check in goes back to A0. Let's say this change takes longer than expected and change more code than expected. This means the coded can't be checked in and I can keep my changes to source control. With some forethought I could perform a branch, but branches can be confusing. A branch needs to be merged back into A0 which can also be problematic. Some multi-developer projects don't allow branching.

With Mercurial I check out the project and a copy of the A0 repository we will call this A1. I can make changes and check in as often as I want to A1 and not affect the A0 repository. The check in will be made to repository A1. Until I update to A0 the changes wont affect the A0 repository and those using it. This means my changes are under source control. I can go back if I make a mistake to any version that I've checked in. Once I perform an update from A1 to A0 all the changes are sent into A0.

I believe Mercurial always performs something similarto  (not exactly) a SVN branch.

I have multiple copies of a project on my hard drive. I checkout work on a feature and check in that feature. If I am working on 3 different features I will have 3 checkouts. Although I am one developer, I am working with the source control as though there are 3 developers performing different changes. I do this for several reasons:

1. 6 months later I can look at the repository and now what changes and to what files were made for the feature.
2. I am learning, to some extent, what happens in a multi-developer environment when conflicts arise. Since I am the developer it is a little easier as I know the code in both the changed and mainline.

By the way, 3 is an example. I usually have 1 my development line. A second on occasion to fix a bug. I will create a third to test out an idea.

Either SVN or Mercurial would work well for your environment. SVN has and still serves me well.  I've also used MS Source Safe, CVS, and researched other version control products. It is also possible to use Mercurial and SVN together although I have read about this I have not tried it.

Hope this clears things up. If you have any questions on either of these or specific best practices I'd be happy to try to answer them. Either PM or on the board.

David Kenny

Brian,

Thanks for taking the time to explain.  I like (and had never thought about it myself) your checking out multiple copies for working on different features.

David

Brian Chirgwin

When files are checked out and when a check in is performed comments can be added. In addition most revision control can be linked into a feature/bug tracking database (have not done this yet). If used in this manner, each feature/bug can indicate what files were changed and tracked.

You can get a list of all changes since a given version or date. This list can tell you what has been accomplished since the last release. Output the information to a text file and you have your list of changes. You won't forget anything.

If you need to check what version has the Widget Fix. You can search the comments for widget fix and find it was in 1.2.3.