About Me
Friends
1 friend
  • admin
bkummel
bkummel
  • Expert Level
  •   (4 Points)
  • Member since
  • Monday, 20 July 2009 16:15
  • Last online
  • 987 days ago
  • Profile views
  • 319 views
 
 
31 months ago
admin and lielar are now friends Oct 13
32 months ago
admin and manishjain are now friends Sep 06
admin and chepseskaf are now friends Sep 03
37 months ago
admin updated a blog entry Seam and EhCache – A... Apr 16
admin created a blog entry Seam and EhCache – A... Apr 16
40 months ago
admin updated a blog entry jBPM supporting BPMN... Jan 09
41 months ago
43 months ago
admin and Sukhorukov are now friends Oct 31
admin and brian.silberbauer are now friends Oct 30
admin and jbosmans are now friends Oct 29
admin updated a blog entry JApplets: Get your c... Oct 12
44 months ago
admin and jmalik are now friends Sep 10
45 months ago
admin and bkummel are now friends Sep 04
admin and Bram are now friends Aug 31
admin and ludovicc are now friends Aug 28
admin and rsd.soa are now friends Aug 24
admin and gcsaba2 are now friends Aug 23
admin is working on JTraining Aug 23

Feeds


Warning: file_put_contents() [function.file-put-contents]: Only 0 of 78572 bytes written, possibly out of free disk space in /var/www/qb102211/data/www/jtraining.nl/libraries/simplepie/simplepie.php on line 7219

Warning: ./cache/e7de014035e1ab2ed3c8f470df1728cc.spc is not writeable in /var/www/qb102211/data/www/jtraining.nl/libraries/simplepie/simplepie.php on line 1623

Yesterday, I installed a fresh Java EE application server to run a test on an application I was working on. The installation of the application server was as simple as unzipping a distribution archive. As with most application servers, the server could be started by running a shell script from the command line. This was all familiar to me, as I already had another instance of the same server installed on my MacBook. However, when I tried to run the script, I got surprised by an error message:

-bash: ./run.sh: /bin/sh: bad interpreter: Operation not permitted

First thing I did was checking the permissions for the file:

ls -al
-rwxr-xr-x@  1 bkummel  staff   8107 22 mei  2009 run.sh

At first sight, there was nothing wrong. The file did have execute permissions. But when I compared the file with the one of the other server-instance, I noticed there was an extra @-sign right after the permissions. With the help from Google and two helpful colleagues, I found some information on the internet. It turns out the @-sign indicates that the file has extended attributes. Luckily, one of the articles also points to the xattr command, that can be used to read and manipulate the extended attributes. So, I continued by querying what extended attributes my file had:

xattr -l run.sh
com.apple.quarantine: 0006;4f8d509d;Google\x20Chrome.app;D9C08949-17F6-44CE-8937-36DB935B50A1|com.google.Chrome

Now I got a clue! This is probably the mechanism that normally causes those “Xyz is an application downloaded from the internet. Are you sure you want to open it?”-dialogs to appear. And apparently on the command line the effect is the error message printed before. So instead of just clicking the “open” button in the dialog, I had to find a way to remove this extended attribute. Luckily, that’s not too complicated:

xattr -d com.apple.quarantine run.sh

Now the attribute is deleted and the script runs without problems. So in case you ever encounter a mysteriously not running script, don’t forget to check for extended attributes!

In previous installments of this series, I’ve covered text editing, file management, command line and copy & paste. This time, I will tell you my experiences with version control clients. Fortunately, there’s quite a selection of good clients available for the Mac. Of course, every VCS has a decent command line client for the Mac, but there are some polished graphical tools as well. The only thing that I haven’t found (yet), is a client that integrates with the Mac OS Finder, comparable to what the TortoiseSVN client does with Windows Explorer.

Which VCS to use?

Well, that question is clearly beyond the scope of this article. For this article, I assume you are working on a project and the VCS is already chosen. I’ll focus on clients for the three most widely used VCSs nowadays: Subversion (SVN), Git and Mercurial (Hg).

Command line or GUI?

Before diving into the different possibilities, it’s good to realize that using the command line is a serious option. Most VCSs do not offer GUI clients themselves, but they all do have a command line client. I think most developers aren’t afraid of the command line. A lot of things can be done very efficiently from a command line. This also goes for version management. However, my experience is that for larger projects, nothing beats a good graphical view on the revision history. And when it comes to comparing differences between revisions, I find a graphical diff tool much easier to use. So most of the times, I end up using both the command line and a graphical tool. (Sometimes I also use the embedded versioning support of my IDE, but I’ll leave that out of the equation for this article.)

Command line clients

There is not much to say about the command line clients, apart from where to get them:

  • Subversion: although it suffers from the rising popularity of distributed VCSs, a lot of existing projects are still using good old Subversion. The Apache Subversion project doesn’t provide any binary packages itself, but luckily Mac OS comes with the Subversion command line tools pre-installed. Should you want to install a specific version yourself, the SVNbinaries project on Collabnet seems to be a good resource.
  • Git: Github has an excellent guide to installing Git on a Mac. After completing the instructions, you will have a working Git command line client on your mac. This client also works good, provided you know which commands to use. As with the SVN command line, the Git command line lacks a visual overview. However, I found myself using the Github website as a partial replacement for that.
  • Mercurial: The Mercurial project provides binary packages for the Mac. I’ve never used it, since I haven’t yet worked on a project that uses Mercurial.

Graphical clients

As mentioned, I still did not find any tool that integrates version control capabilities into Mac OS Finder, as good old Tortoise does for Windows Explorer. However, some excellent stand alone clients make up for that miss.

Cornerstone

Cornerstone by Zennaware is an excellent Subversion client. One of my colleagues is a huge fan of it. He convinced me to try it, so I downloaded a 14-day trial version. I’m impressed. It’s a full-featured app that just works. And it looks gorgeous. However, there are free alternatives. So I couldn’t convince myself that I needed to pay for a client that only supports Subversion, while there are free clients that support Subversion, Git and Mercurial…

Sourcetree

Sourcetree is created by Atlassian, the company behind Jira, Confluence and many other collaboration tools. Sourcetree is a Git, Mercurial and Subversion client in one package. It has a nice Mac-like user interface, although the interface is not as polished as Cornerstone’s interface. Branches are displayed graphically, wich is very helpful. As Git and Mercurial client, Sourcetree does an excellent job. For Subversion, the experience is somewhat different, as Subversion is not supported directly, but only by using Git or Mercurial as “man in the middle”. That means to check out a Subversion repository, Sourcetree creates a local Git or Mercurial repository. (The choice is up to you.) This has the advantage of being able to work distributed even though Subversion itself is not a distributed VCS. A disadvantage is that, if you already have checked out a project, e.g. via the command line Subversion client, you won’t be able to open it in Sourcetree. However, I think we will see more and more Git and Mercurial and less Subversion in the years to come. So I think Atlassian made the right choice with their approach to Subversion support in Sourcetree. All in all, Sourcetree is a very competent VCS client. I think it’s awesome that there’s a free client that supports the three most important VCSs!

GitX

GitX is an open source Git client for Mac OS X. It has a nice and clean GUI and seems to work okay. The history view shows the branches is a similar graphical way as Sourcetree does. According to the GitX website, that graphical display is inspired on gitk, the history viewer provided by the git project itself. I didn’t use GitX for a long time, but it seems to do a good job.

Others

There are actually a lot more options if you are looking for a graphical VCS client on the Mac. I tried GitHub for Mac briefly, but I found the user interface  to be less intuitive than the other tools I tried. There’s also Sprout, a commercial git client. I haven’t tried it. The screenshots look nice, but as said before, I don’t see a reason to buy a paid client when free alternatives seem to work fine too. There are also some good-looking, open source Mercurial clients I haven’t tried (yet): MacHg and Murky. When it comes to Subversion-only clients, there is also Versions, which competes with Cornerstone.

Conclusion

There are quite a few GUI VCS clients available for the Mac. It is interesting to see that for Subversion there are two competing commercial products, where for both Mercurial and Git there are several open source clients available. I found only one client that supports all three major VCSs. I like the fact that I don’t have to get used to three different user interfaces, so I’m sticking with Sourcetree for now. Do you have similar or different experiences? Did you find a Finder-integrated solution? Or do you think we don’t need that at all? Feel free to share your thoughts in the comments section below!