Tuesday, September 27, 2011

Show a change log after a pull in Mercurial

When working in a team on the same mercurial repository, I often want to know what has changed singe my last pull. Turns out its easy to add a hook that will do just that.  To print the change log after every pulladd the following to the [hooks] section of your ~/.hgrc file:
[hooks]
changegroup.cnglog=hg log -M --stat -r $HG_NODE:tip

But of course, bright colours are fun, so we'll use hg styles to colour-code the log. Steve Losh has a good blog article about using styles to dress up the CLI. After downloading the styles to say /home/bryan/hg/, update the trigger to use the style:
[hooks]
changegroup.cnglog=hg log -M --stat -r $HG_NODE:tip --style /home/bryan/hg/map-cmdline.slog


1 comment:

  1. Best Merkur Merkur Classic 1904 Double Edge Safety Razor
    Merkur classic 1904 메리트카지노 double edge safety razor. Classic 1904 double edge safety razor. Made in Germany. Features: Closed comb head. Rating: 3.9 · カジノ シークレット ‎9 votes · ‎$62.95 · 1xbet korean ‎In stock

    ReplyDelete