Following open source projects

I follow a fair number of open source projects. Most of them are based on SVN, a few on Git, a couple on Mercurial, and only one or two on CVS. There is, unfortunately, no equivalent to the Tortoise system for Mac (TortoiseSVN, TortoiseCVS, TortoiseGit, TortoiseHg, etc). The best we have is the wonderful Versions application, although that only supports Subversion repositories.

When I need a repository, I'll usually use Subversion. I understand how it works, I'm familiar with it, and I don't need the powerful distributed control that Mercurial and Git offer. I just need something that can track the changes I make to a project over time and support minimal branching, tagging, and merging. Subversion (coupled with Versions) works great for that.

However, when I follow projects that don't use Subversion, I can often lose track of when I need to update them. Versions has a nice little status bubble in its repository listing, but Git, CVS, and Mercurial don't have any sort of decent GUI on the Mac.

To solve this, I came up with the following bash script that I stuck in ~/Applications and execute every now and then:

  1. #!/bin/bash
  2.  
  3. IFS="
  4. "
  5. function updateProjects {
  6.         cd $1;
  7.         for i in $(ls $1); do
  8.                 cd $i
  9.                 echo "Updating $i";
  10.                 eval $2;
  11.                 cd ../;
  12.         done;
  13. }
  14.  
  15. svn_dir="/Users/dave/Developer/Open Source/SVN Projects"
  16. git_dir="/Users/dave/Developer/Open Source/Git Projects"
  17. hg_dir="/Users/dave/Developer/Open Source/Hg Projects"
  18. cvs_dir="/Users/dave/Developer/Open Source/CVS Projects"
  19.  
  20. updateProjects $svn_dir "svn up";
  21. updateProjects $git_dir "git pull";
  22. updateProjects $hg_dir "hg update";
  23. updateProjects $cvs_dir "cvs update";

I just run that once a day or so, and it automatically keeps my checkouts and clones supplied with the latest changes.

Comments

SCPlugin

Um, yes there is (for SVN). SCPlugin.

You're right, there is. But

You're right, there is. But since I have Versions, I don't really need an SVN plugin for Finder. =)

I have a similar need/desire

I have a similar need/desire to follow many open source projects, and found that I can do so for most using ext, found here:

http://github.com/azimux/externals

It only supports svn and git at the moment, but it seems simple enough to add more. I've wanted to get to cvs for a while but real work keeps getting in the way.

-lane
www.roathe.com