Graph log extension

This extension is currently being distributed along with Mercurial. (However, not yet in any released version.)

Author: Joel Rosdahl

A version working with Mercurial 0.9.3 (and maybe older) can be found here: http://hg.rosdahl.net/hggraphlog

Overview

This extension adds a new command glog that behaves like (a subset of) the normal log command except that it also prints a graph representing the revision history using ASCII characters to the left of the log. Example:

% hg glog
@    changeset:   4276:cb6107f78b92
|\   tag:         tip
| |  parent:      4269:73c918c71300
| |  parent:      4275:81402b2b294d
| |  user:        Matt Mackall <mpm@selenic.com>
| |  date:        Sat Mar 24 02:57:27 2007 -0500
| |  summary:     Merge with crew
| |
o |  changeset:   4275:81402b2b294d
| |  user:        Alexis S. L. Carvalho <alexis@cecm.usp.br>
| |  date:        Fri Mar 23 23:40:25 2007 -0300
| |  summary:     use os.path.islink instead of util.is_link
[...]

Nodes printed as an @ character are parents of the working directory. Otherwise, the graph is hopefully self-explanatory.

Configuration

Enable this extension by adding the following lines to your configuration file (hgrc):

[extensions]
hgext.graphlog = 

Or, if using the unbundled version:

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

Usage

hg glog [OPTIONS]

where options are:

-l/--limit LIMIT        limit number of changes displayed
-p/--patch              also show patch
-r/--rev REV            show the specified revision or range
   --style STYLE        display log using STYLE (e.g., "compact")
   --template TEMPLATE  display log using TEMPLATE (e.g., "{desc}\n\n")


CategoryExtension