Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2008-06-12 09:46:49
Size: 1377
Comment: 2 minor bugs found
Revision 4 as of 2010-08-28 15:12:41
Size: 1382
Editor: abuehl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
Line 33: Line 32:
CategoryExtension CategoryBundledExtension

Interhg Extension

This extension is distributed with Mercurial.

Author: Ohashi Hideya

Overview

The `interhg' Mercurial extension allows you to use shortcut expressions in your changelog and summary texts that are automatically expanded into links or any other arbitrary expression, just like what InterWiki does.

Configuration

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

[extensions]
interhg =

These are some example patterns (link to bug tracking, etc.)

[interhg]
issues = s!issue(\d+)!<a href="http://bts/issue\1">issue\1<\/a>!
bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!<a..=\2">\1</a>!i
boldify = s/(^|\s)#(\d+)\b/ <b>#\2<\/b>/

Add any number of names and patterns to match

Comments

As of hg 0.9.5, there are some problems when using interhg to implant links into commit comments display:

  • on the changeset view, it breaks the title line (line above "author:") because the a.title css uses "display:block". Looks ugly.
  • on the shortlog view, it only links the text left of the interhg link to the changeset (there is also a changeset link in another column, so no big problem). this is maybe because it nests <a> tags (not sure this is allowed by html). better would be to close and reopen the outer tag.


CategoryBundledExtension

InterhgExtension (last edited 2012-02-29 15:26:49 by ScottPalmer)