hg-revspec /

Filename Size Date modified Message
57 B
1.6 KB
7.4 KB
790 B

This is a Mercurial extension to test the proposed revision specification language (see the development mailing list conversation at http://comments.gmane.org/gmane.comp.version-control.mercurial.devel/30524).

The extension provides a single command, debugrevspec, that takes a single argument a query specification. It then passes the result of this query on to the usual log command. Note that sorting and file-related filters haven't been implemented yet (e.g., file, adds, removes, and modifies).

Below are some examples of queries one can make against the Mercurial repository:

"ancestor(stable, default)"

The common ancestor of the stable and default branch (the last merge point).


The first parent of the tip of the stable branch.


All changesets on the default branch.

"branch(default) and (user(Martin) or keyword("i18n"))"

All changesets on the default branch where the committer either is called Martin or the commit message (or one of the file names) contain the string i18n.

To use this extension, run "python setup.py build" and point to the relevant folder inside the generated build/ folder from your hgrc, e.g.:

[extensions] revspec = /path/to/revspec/build/lib.linux-i686-2.6/revspec

Adjust as necessary for your system and platform.

Please note that this extension is a /proposal/, it is in no way finished, perfect or the exact way things are going to be. Play around with it and weigh in on the thread on the Mercurial development list on any issues you may encounter, or whether it is the most awesome thing since sliced bread.