Differences between revisions 1 and 2
Revision 1 as of 2008-06-01 16:04:17
Size: 826
Comment: Add missing interhg page
Revision 2 as of 2008-06-12 09:46:49
Size: 1377
Comment: 2 minor bugs found
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
=== 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.

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.


CategoryExtension

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