Mercurial and Mac OS X

Tim Smith tzs at eacceleration.com
Tue Apr 13 19:53:59 CDT 2010


Mostly command line for me. Occasional use of hgk and hgtk if I'm confused about my repository.

A couple things I've found that have made hg and my Mac get along better.

1. I have .DS_Store in my global .hgignore file. Very bad things happen if you accidentally get a .DS_Store file added to your repository.

2. I have this pre-commit hook in my global .hgrc:

[hooks]
pre-commit = mdfind -0 -onlyin . "kMDItemContentTypeTree='com.apple.package'" | xargs -0 hg addremove

That makes documents from applications like OmniOutliner (which I use to keep my notes) work a lot better with hg. These kind of documents are actually directories at the Unix level, with extended attributes that tell the system that they are documents from the application point of view. So, for instance, when you add an attachment to an OmniOutliner outline, the attachment is actually stored as a file in that directory. To Mercurial, the attachment is just a new unversioned file, and so will be ignored.

What that hook does is find all the directories that have the attribute set that marks them as being this kind of directory, and does an addremove on them, so Mercurial will pick up any new files the application has added and remove any files the application has deleted.

On Apr 13, 2010, at 10:40 AM, André Sintzoff wrote:
> 
> Are you using only the command line?
> Or do you have any preferred GUI tool?
> 

-- 
Tim Smith
AIM: tzs666
SMS: 360 649 8573
Twitter: http://twitter.com/tim_smith







More information about the Mercurial mailing list