Local Branch Extension

This extension is not distributed with Mercurial.

Author: Brendan Cully

Download site: http://hg.kublai.com/mercurial/extensions/localbranch

Overview

This extension provides a new command lbranch, with which you can create and manage in-repository clones. One advantage these have over regular clones is that they share a working directory, so they are cheaper to create. They are also less work to use. Often you have the path to your working directory mentioned in several other locations (external build tools, path, etc), so a full clone requires many other updates. This way everything works against your branch automatically.

lbranch with no arguments lists the local branches in the current repository. lbranch foo switches to local branch foo, creating it if it does not yet exist. lbranch -d foo deletes local branch foo.

You can pull from or push to local branches by their branch name, or by the unambiguous form lbranch://foo (which is often necessary to pull or push to default).

Additional design notes may be found at LocalBranches

Configuration

Configure your .hgrc to enable the extension by adding following lines:

[extensions]
localbranch = /path/to/localbranch.py


CategoryExtension