Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

version control

by sekitan (Beadle)
on May 18, 2005 at 15:53 UTC ( #458260=perlmeditation: print w/replies, xml ) Need Help??

It has come to my attention that some of my code version and history tracking practices are not all that they could be. I have been advised to try RCS, CVS, SVN or something of this nature. What do you use? Are you happy that you use it? What do you wish you could use?

As a side note, I am working in a Win32 shop, and will most likely be forced to run any such app as a stand alone on 2K or XP. I am still interested in *nix solutions for future best practice.

Replies are listed 'Best First'.
Re: version control
by perrin (Chancellor) on May 18, 2005 at 15:56 UTC

      I would second the suggestion of subversion. One feature that may be attractive to you in a Windows environment is that subversion transparently handles binary files - so you can still version Word documents, .exe files and any other binary junk you have lying around without having to figure out if its is binary or not.

      I keep my home directory synchronized between my laptop and desktop with subversion, which is overkill, but it means I can accidentally delete whole trees and recover them, and when I tried to do this with CVS it barfed and died on my email (a weird mix of plain text and plain text representations of binary data). Good luck.

      Totally agreed. Also, while you are on Win32, make sure to check out Tortoise SVN for a seamless integration into Explorer that just keeps on getting better and better. With this, I even have "clueless" customers accessing and contributing to parts of our repository, because it makes things so easy. I wish there was something similar for Gnome, it's really excellent.

      Also, if you need to do custom stuff with your version control, the perl bindings are starting to become pretty stable and useful. I'm currently toying around with them, not having done anything really useful yet though. :)

Re: version control
by duff (Parson) on May 18, 2005 at 16:02 UTC

    I use subversion (SVN) and would recommend it over either RCS or CVS (for both Windows and Unix). The subversion book is at Also, there's a subversion client called tortoisesvn that integrates with windows explorer quite nicely. Your folders under revision control look just like any other folder except the icon is a little different to let you know they are revision controlled.

Re: version control
by disciple (Pilgrim) on May 18, 2005 at 16:53 UTC

    I agree with pboin. Using any kind of version control is better than no version control.

    Even manually archiving your files is better than nothing. I used this option when contracting for an organization who would not install any version control software and would not let us install any software on our dev machines. So I wrote a script that compressed all the projet files. I ran it at least once per day.

    I have also used Visual Source Safe, and this too is better than nothing. I would say however that it's support for branching and merging is very limited. It also suffers from frequent database corruption and things get worse when your repository reaches 2gb in size.

    I recently converted my shop to SVN. My reasons for picking SVN are as follows:

    • It is free.
    • It runs on Windows.
    • There is a large community of users from which you can get support.
    • There are many client tools, however for Windows TortoiseSvn is probably the best.
    The same can be said about CVS but SVN sports many enhancements over CVS such as:
    • Atomic commits.
    • Cheap copying (which includes cheap branching and tagging since they are copy operations)
    • All files committed in one operation are given the same revision number. (some don't like this, but I do)
    • Versioning of file properties.
    • Versioning of directories.
    • Built in move and rename operations. (rename is actually the same as move)
    • Apache modules for remote HTTP access.
    • Apache modules for directory security.

    The install and configuration of SVN and Apache on a WinXP box was straight forward. I purchased the book "Pragmatic Version Control: Using Subversion" and it details step by step what you need to do in Appendix A. This information is also available in the free online book:

    So in short, define your needs and choose a system that meets your needs. If you have a hard time making a decision after that, then I would choose SVN. Unless your needs are greater than SVN can support (which is unlikely unless you are a huge shop), I don't think you can go wrong with that choice.

Re: version control
by brian_d_foy (Abbot) on May 18, 2005 at 17:20 UTC

    Well, if you want to stick with Perl, you can use svk, which has elements of subversion, is written in Perl, and has some other fancy features.

    If you are starting something new, I'd stay away from CVS. I think the only people who would recommend it are people who have to use it currently. CVS doesn't let you rename files, but Subversion does. From their web page: "Subversion is meant to be a better CVS". Subversion mostly took all of the annoying bits of CVS and fixed them, so don't start with the annoying bits. :)

    And, subversion works on Windows.

    brian d foy <>
      I'll confuse the OP and say CVS should be your first choice. Reasons follow
      • For me, CVS is much simpler and more intuitive than Subversion.
      • CVS is much more mature, with a wider body of knowledge and experience. If your having a problem, your more likely to find a CVS person to help than a Subversion person. This will, of course, change over time.
      • CVS is available by default on a lot more systems than Subversion - generally you'll have to install and configure Subversion, CVS will probably be there. Again this will change over time
      • In my experience, renaming files, ala Subversion, isnt that common an operation. Of course if your work requires constant renaming, Subversion becomes a more attractive option. That said, when more extensive versioning features (say like ClearCase - expensive but feature-rich) are available, it does open whole new worlds of dev/build/release options
      • more tools integrate back to CVS than Subversion (at present - again this is a moving target)
      • If you start your introduction of version control with CVS, I'm pretty sure 100% of your versioning needs will be met for quite some time. By the time you realise CVS isnt all you want, you will be better armed to know what you need from a versioning tool. If that new tool is Subversion, it offers migration tools (and most version control suites offer cvs2xxx-like tools) is better to be approximately right than precisely wrong. - Warren Buffet

      svk isn't quite ready for win32 yet
Re: version control
by dragonchild (Archbishop) on May 18, 2005 at 16:52 UTC
    Let me put your choices in perspective:
    • RCS came first, building on cico.
    • CVS was built, initially, on top of RCS (though it has forked quite a bit).
    • After a while, the developers of CVS decided to make a better source control, so they wrote SVN.

    Take your pick, but I know which one I use ...

    • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
    • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"
Re: version control
by pboin (Deacon) on May 18, 2005 at 16:06 UTC

    The best version control is the one that you use. The only thing I'd add is to make sure to investigate the extra goodies that front-end for different systems. I'm continualy impressed by CVSWeb, a web front-end that has pretty slick repository browsing capabilities.

    And please, don't give up. There's a bit of a pain curve in moving to version control, but it's *really* a good idea.

      Speaking of extra goodies, check out Trac (for svn) and CVSTrac (for cvs). They bundle repository browsing with a bug tracker and a wiki for documentation.

      Interesting how when you leave the www out of it takes you to the SQLite homepage...

Re: version control
by adrianh (Chancellor) on May 19, 2005 at 13:25 UTC
    I have been advised to try RCS, CVS, SVN or something of this nature.

    Of those three I would definately go for Subversion.

    What do you use?

    Subversion :-)

    Are you happy that you use it?

    Yup. I didn't realise what a royal PITA CVS was until I'd used subversion for a few months. It took that long for my CVS brainwashing to expire.

    Are you happy that you use it? What do you wish you could use?

    I'm pretty happy, and don't feel the need to change at the moment. If I was having to maintain some public repositories I would probably look at something like darcs, monotone or svk since I like being able to commit when I don't have connectivity.

Re: version control
by etcshadow (Priest) on May 18, 2005 at 18:18 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://458260]
Approved by TStanley
[choroba]: Good morning!
marto waves

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2018-05-24 09:11 GMT
Find Nodes?
    Voting Booth?