Wednesday, May 19, 2010

Using .hgignore

Being a Java guy by day I typically use the source control stalwarts subversion and cvs. I've been exposed to other source control software of course. I used Borland's StarTeam on one gig, and I had a brief, horrific experience with Visual Source Safe.

Now that I'm a Python guy by night I have been using Mercurial. I like it. Its fast. Bitbucket is really sweet.

I use it on the command line; although, NetBeans has built in support. Naturally I got tired of seeing all my compiled Python files (*.pyc) when I ran, "hg status."
hg status
...
flatpages/forms.pyc
flatpages/models.pyc
...
Putting a file, ".hgignore" in the root of the directory is the solution. This is duly documented all over the web. I had problems with the syntax nonetheless.

That was what I ended up with:
# use glob syntax.
syntax: glob
*.elc
*.pyc
*
*.bfproject
*.kpf

templates_compiled/**
The glob syntax is pretty intuitive.

No comments: