blazar has asked for the wisdom of the Perl Monks concerning the following question:

I've been using Subversion @ $work for revision control and my coworkers (or better, the senior developers there, it's me who was a cow-orker!) gave me enough survival info to deal with it. Whatever, I never really got into it. However I'm increasingly feeling the need to use some SCM for managing the Perl stuff I write for myself, and today the reading of a recent thread renewed my interest and my curiosity.

I've read amongst others the following

Yet, my ideas are still somewhat confused. Key points to keep into account are:

All in all those that seem promising to me are Bazaar, darcs, Mercurial and SVK. Of course I'm intrigued by the fact that SVK is written in Perl, although I guess the implementation language is not that relevant after all. (But maybe that would offer me some potentially useful "hooks", who knows?) I also read rinceWind'a SVK article with interest. And I only see positive aspects in getting familiar with Subversion anyway, since many important projects use it in any case. But the other ones seem promising too.

Any recommendation?

  • Comment on [OT?] SCM recommendation for small to medium size Perl projects

Replies are listed 'Best First'.
Re: [OT?] SCM recommendation for small to medium size Perl projects
by GrandFather (Saint) on Mar 05, 2007 at 21:35 UTC

    At $work we use CVS (but may shift to SVN). At home for developing small Perl based projects I use Subversion. In both places I use Windows and either TortoiseCVS or TortoiseSVN. Tortoise takes a lot of the pain out of using either product.

    For home use SVN is easy to set up and maintain and with Tortoise integrates very nicely with Explorer (under Windows). I also have a small SVN server hosted for me by a friend that I use to manage the PMEdit project. Again that was easy to set up and is easy to use. One of my reasons for using a RCS at home is because I work on a couple of machines (laptop and desktop).

    I had a brief look at Monotone, but without a client I didn't persist with it. How it pans out with regular use I don't know, but it is somewhat different to the RCS's I'm familiar with.

    Update: I should add that there are some important differences between CVS and SVN. Most important is that CVS deals with files - it has no idea of the relationships between files nor any way of tracking files if they move, are refactored or change their names. SVN on the other hand deals with the whole repository - a commit is an update of the state of the whole repository and thus tracks directory structure and file name and location related changes.

    Branching and tagging are quite different between CVS and SVN too. One result of this is that some tagging operations that can be expensive for CVS cost almost nothing for SVN - not a big issue for home use, but something that hits us hard at work every day!


    DWIM is Perl's answer to Gödel
      At $work we use CVS (but may shift to SVN). At home for developing small Perl based projects I use Subversion. In both places I use Windows and either TortoiseCVS or TortoiseSVN. Tortoise takes a lot of the pain out of using either product.

      I did experiment with RCS and CVS in my early Linux days, but having used SVN for some time and being aware that it is at all effects intended to be a replacement for CVS addressing its flaws, I wouldn't go the CVS route in any case. Unless I had to, that is. But talking about something I need for personal use, I certainly don't "have to" adopt anything particular.

      I saw the documentation for TortoiseSVN and although it seems definitely cool, and useful, and having it installed under Windows would most certainly not do any harm, I'm more of a cli kinda guy, and I wouldn't rate high in my requirements the availability of gui tools.

      One of my reasons for using a RCS at home is because I work on a couple of machines (laptop and desktop).

      That's exactly the same situation as mine, except that I may want to have my utilities available on some other systems too, that are not strictly @ $home, and I may want to update them there too, easily propagating the updates to other locations, of course.

      I had a brief look at Monotone, but without a client I didn't persist with it.

      In which sense? I had a brief look at its homepage too, as hinted in the root node. Indeed it seems that it doesn't follow a C/S architecture, but rather a distributed one. Yet AIUI there are versions of the program available for most common architectures...

      Update: I should add that there are some important differences between CVS and SVN. Most important is that CVS deals with files - it has no idea of the relationships between files nor any way of tracking files if they move, are refactored or change their names. SVN on the other hand deals with the whole repository - a commit is an update of the state of the whole repository and thus tracks directory structure and file name and location related changes.

      Indeed, that's a big plus for me. In fact, even if my stuff is small in size I may still have some script splitting in two, or becoming something different from what it was initially thought to be and changing name accordingly. Or spawining a module. And I would like to keep track of these changes. Of course this a feature that AFAICT all modern SCMs have...

        You may be interested in http://better-scm.berlios.de/comparison/comparison.html which compares a slew of different revision control systems.

        I'm a GUI kinda guy. Having just discovered that Tortoise lets you add detail columns to explorer for things like tags and version numbers I'm in clover. ;)

        It's a year since I looked at Monotone, but as I recall it tracks files by their md5 hash - same hash, same file. Much of the interaction with Monotone seemed to involve having to manage files using hashes, but maybe I just didn't grok the interface - I've certinaly forgotten the details.

        Of course this a feature that AFAICT all modern SCMs have... [cf. changeset commits]

        CVS doesn't, although I guess you could argue that it's not modern.


        DWIM is Perl's answer to Gödel
Re: [OT?] SCM recommendation for small to medium size Perl projects
by Joost (Canon) on Mar 05, 2007 at 22:56 UTC
    IIRC, SVK is an extension to subversion that provides a "personal repository", primarily to make it easier to do work in and update your own personal trunk while you and other people are working on big changes simultaniously. as far as I can make out, that's mostly useful when working on a project with many developers. Git and Monotone do something similar.

    This kind of distributed approach might be useful to you, but if you are the only one working on the project and you can synchronize your repositories often enough (i.e. you plug in your laptop into your local network once a day) it's probably only going to add overhead.

    If you are the only one/one of the few people working on projects, svn is probably good enough. The size of the project probably doesn't really matter. Also, svn is probably easier to get into your head than the distributed systems available. Personally, I use subversion. I might check out something more sophisticated if I was working with many people, but currently, I'm not, and for my own stuff svn is easy to work with, and it keeps all my code safe.

Re: [OT?] SCM recommendation for small to medium size Perl projects
by wjw (Priest) on Mar 05, 2007 at 22:02 UTC
    In your circumstances I would go with SVN for two reasons:
    • what you learn at home, you can use at work
    • client availability
    One thing to note however, is that if you start with cvs, there is a script which allows you to convert to svn. To the best of my knowledge, there is not an automated way of going from svn to cvs.

    From the command line, I have found cvs to be limiting, but fairly straight forward to use whereas svn can be a royal pain.

    Both have supporting modules in at least perl and java and integrate via plugins with Eclipse and a couple of other IDE's.

    I keep track of my stuff in cvs because it is all that I need, and my situation is similar to yours. Good luck in your decision :-)

    ...the majority is always wrong, and always the last to know about it...

      From the command line, I have found cvs to be limiting, but fairly straight forward to use whereas svn can be a royal pain.
      Really? In what way? I found svn to work mostly the same as cvs from the command line, except that it also does renames and works with directory trees (instead of just same-name files, as cvs does). I've always prefered the command line interface for both instead of the GUIs, anyway.

      what you learn at home, you can use at work

      Very good point. Although at the moment I am so "lucky" as not to have to work...

      client availability

      This is another very good point. Although it also contributes to confuse me. The point is, up to some time basically there was only CVS, at least speaking of free SCMs. Now there's a flourishing of just so many of them that it's hard to pick up one. Well, not really: it's easy, but one wonders what each and any of them would have to offer him. Having multiple clients to choose amongst is somewhat yet another situation of the same kind.

      One thing to note however, is that if you start with cvs, there is a script which allows you to convert to svn. To the best of my knowledge, there is not an automated way of going from svn to cvs.

      Oh no, as I explained in my answer to GrandFather's reply, I don't see any advantage in starting with CVS and most probably I won't do so...

      From the command line, I have found cvs to be limiting, but fairly straight forward to use whereas svn can be a royal pain.

      In which sense? Although I kept forgetting things frequently enough to continuously have to ask coworkers for tips, I remember from my experience with SVN that most operations mimicked common *NIX filesystem managing commands and utilities, thus it was rather easy to use in this sense.

      Both have supporting modules in at least perl and java and integrate via plugins with Eclipse and a couple of other IDE's.

      Well, interesting to know. But I don't use any IDE anyway. Just a plain old text editor. (However last I checked there was a CVS mode for it, and I bet a SVN one is available too; it's own sources are maintained under Subversion.)

Re: [OT?] SCM recommendation for small to medium size Perl projects
by xdg (Monsignor) on Mar 06, 2007 at 00:17 UTC
    I will be using this for managing personal projects which are small or at most medium size

    Here's what I do:

    • Work sites include home linux computer(s), home Windows XP virtual machine, work Windows XP laptop

    • Subversion as a common SCM platform -- works "out of the box" on most Linux distros and easy to get for Windows

      • googlecode for personal CPAN modules

      • Some shared projects (e.g. Strawberry Perl) in Alias' Phase-N repository

      • Personal subversion repository on a network available machine for utility scripts, dotfiles, vim settings, notes, etc.

    • SVK as my common tool on all platforms

      • svk pull and svk push make merging to and from the master easy on each computer -- no need to manually track merge points; still have to remember to push from each location when done working there

      • local repository mirror on the laptop means I can work offline and still check work in periodically as features are implemented and tested (safety net)

    • Subversion command line client on all platforms

    • TortoiseSVN on Windows as well

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: [OT?] SCM recommendation for small to medium size Perl projects
by geekphilosopher (Friar) on Mar 05, 2007 at 22:26 UTC
    I use perforce at $work. It's not open source (or free for more than a handful of users), but because I'm quite familiar with it I use it at home. I've recently set up an SVN server but haven't gotten around to using it yet. Of course, if I use SVK, I won't have to choose - it can handle multiple backends, from what I hear.
      Of course, if I use SVK, I won't have to choose - it can handle multiple backends, from what I hear.

      I see from the homepage that currently supported are: CVS, Perforce, Subversion, Arch and cvsbk.

        I see from the homepage that currently supported are: CVS, Perforce, Subversion, Arch and cvsbk.

        Although some of those only allow you to pull data into SVK, not push data back out again.

Re: [OT?] SCM recommendation for small to medium size Perl projects
by jimX11 (Friar) on Mar 06, 2007 at 02:35 UTC
Re: [OT?] SCM recommendation for small to medium size Perl projects
by j3 (Friar) on Mar 06, 2007 at 18:12 UTC
    Any recommendation?

    I'd suggest going with one that has very good documentation, and has a helpful contributor community around it. Actually, that's my advice for choosing any type of free software.

    I wouldn't factor implementation language very heavily in the decision.

    Personally, I've been trying to make time to look at alternatives to CVS. Bazaar is first on my list.