Forest Extension

This extension is not being distributed along with Mercurial.

Author: Robin Farine

Download site: [http://www.terminus.org/hg/hgforest public development repository].

Overview

The Forest extension allows operations on trees with nested Mercurial repositories, called forests.

It provides some additional commands that apply to the forest. These commands are both standard Mercurial commands, such as 'clone' or 'status', that are applied recursively, and commands that involve a snapshot file, to represent the state of a forest at a given time.

The new commands defined by the extension are: fclone, fpull, fpush, fseed, fsnap, ftrees and fupdate

Configuration

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

[extensions]
hgext.forest=
# or, if forest.py is not in the hgext dir:
# forest=/path/to/forest.py

Some additional configuration can be done using the '[forest]' stanza in your configuration file:

[forest]
# will nested repositories directly under a .hg directory be skipped (0|no|false) or not (1|yes|true)?.
# The default value is 0. (don't skip them)
walkhg = (0|no|false|1|yes|true)

Usage

To clone a forest:

hg fclone [OPTIONS] SOURCE DESTINATION

To pull/push/update all repos in the forest:

hg fpull [OPTIONS] SNAPSHOT-FILE PATH-ALIAS

hg fpush [OPTIONS] SNAPSHOT-FILE PATH-ALIAS

hg fupdate [OPTIONS] (--tip | SNAPSHOT-FILE)

To take a snapshot of a forest:

hg fsnap [OPTIONS] [SNAPSHOT-FILE]

To populate a forest according to a snapshot file:

hg fseed [OPTIONS] SNAPSHOT-FILE [PATH-ALIAS]

To display the status of the forest:

hg fstatus [OPTIONS]

To list the roots of repositories:

hg ftrees [OPTIONS]


CategoryExtension