Greg Aker

Entries Tagged with: Mercurial

Local Branching with Mercurial

Filed in: web-dev, Mercurial

March 17, 2011

As you may or may not know, at EllisLab, we use Mercurial for our source control management. When we moved to hg from SVN, we were highly critical of what system we wanted to use, and spent a good amount of time looking into the different distributed version control systems out there. In the end, we found that Mercurial suits us best.

When we were on SVN, I used git-svn, as I love the ability to branch locally, hack away—committing often, then merge & push to the 'blessed repository.' One of my struggles in moving to Mercurial, is that there ...

Read More

Deploy ExpressionEngine with Fabric

Filed in: ExpressionEngine, Mercurial

November 12, 2010

A lot of people use Capistrano and GitHub for their ExpressionEngine deploys, I wanted to show an alternative, BitBucket and Fabric.

There isn't quite the level of automagic in Fabric as with Capistrano, but being a sys admin, automagic scares the shit out of me. Anyhoo, I posted yesterday about developing on the CodeIgniter trunk, and in my base repository I linked to, I have a file in the base named fabfile.py. If you keep a similar repository setup to what I have, this will work splendidly for you. If you don't, you'll need to tweak ...

Read More

Developing on the CodeIgniter Trunk

Filed in: PHP, Mercurial, CodeIgniter

November 11, 2010

Earlier this evening, Kenny Meyers posed a question on Twitter about how to develop with CodeIgniter while working off the trunk. With Mercurial, it's easy.

We'll use a mercurial sub-repository so CodeIgniter is running off the EllisLab CodeIgniter repository. In fact, I created a quick repository over at BitBucket to help me easily start a new project.

Here is my basic project directory structure.

> tree 
.
├── fabfile.py
└── src
    ├── application
    │   ├── config
    │   ├── controllers
    │   ├── core
    │   ├── errors
    │   ├── helpers
    │   ├── hooks
    │   ├── index.html
    │   ├── language
    │   ├── libraries
    │   ├── models
    │   ├── third_party
    │   └── views
    ├── codeigniter
    │   ├── application
    │   ├── index.php
    │   ├── license.txt
    │   ├── system
    │   └── user_guide
    └── public
        ├── example.htaccess
        ├── index.php
        └── static
            ├── css
            ├── images ...

Read More

PHP Lint Mercurial Extension

Filed in: Mercurial

October 25, 2010

Here's a quick Mercurial extension that enables a PHP programmer to do a quick syntax check on files to be committed. It'll help you in a couple of ways.

  1. Catch some blatant errors before you push.
  2. Save money. Don't you have to purchase team members a beer every time you commit with errors?

Get it at BitBucket

Read More

Count number of commits users have in mercurial

Filed in: Mercurial

October 22, 2010

A quick command line tip to return a list of every committer in a mercurial repository, as well as the number of commits they have.

hg log | grep '^user\?'|cut -d':' -f2|sort|uniq -c|sort -nr

Make it an alias in your ~/.bash_profile so you don't have to remember.

Read More