@ncalexander

hg booklog: log changesets not yet merged to mainline

Mon 28 October 2013

In my workflow, I use changeset evolution and lots of feature bookmarks. I often want to see what the state of a feature bookmark is. This is easy in git (git log from..to) but doesn’t seem to be so easy in hg. Since my bookmarks are of the form bug-XXX-short-desc, I most often want to match on the bug number. So I’ve added the following to my hgrc file:

[alias]
booklog = log -r "reverse(ancestor(tip, bookmark('re:$1'))::bookmark('re:$1') and not ancestor(tip, bookmark('re:$1')))"

which allows:

$ hg booklog 915312
changeset:   152399:dae3fc591fe3
bookmark:    bug-915312-native-crypto
user:        Nick Alexander
date:        Mon Oct 28 09:10:35 2013 -0700
summary:     Bug 915312 - Part 3: Hacked up tests.

changeset:   152398:12ce02ac7b32
user:        Nick Alexander
date:        Sun Oct 27 21:50:46 2013 -0700
summary:     Bug 915312 - Part 2: Build native crypto library.

changeset:   152397:493d5e48c5fb
user:        Nick Alexander
date:        Sun Oct 27 21:49:50 2013 -0700
summary:     Bug 915312 - Part 1: Initial commit.
Nick Alexander

About Nick Alexander

Mathematician. Mozillian. Runner. Master of Disguise.