Requirements

  1. Download and install Python 2.6.5
  2. Download and install python-ntlm
  3. Download and install Mercurial

Configuration

To enable this hook, edit your configuration file (hgrc) to the following:

[extensions]
tfs = c:/path/to/tfs.py

[hooks]
# run the hook on every change that is pushed or pulled in here
incoming.tfs = python:tfs.hook


The extension is configured through a configuration section. The following keys are recognized in the [tfs] section:

Required Values

Key Description
host The Team Foundation Server URL that you connect with.
user The user name used to authenticate with the Team Foundation Server.
password The password used to authenticate with the Team Foundation Server.

Optional Values

Key Description Default Value
regexp This is the regex that is used to extract work item ids that should be updated when the hook runs. It must contain only one capturing "()" group that surrounds the bug ids. (?is)Work ?Items?: (.+)$
template Template to use when formatting the comment added to the work item. This will override the default template used. Keywords include the usual Mercurial keywords. Fixed in revision {node|short}.


The [tfs.columns] section is used to specify additional columns that are also written to when updating a work item template.
The [tfs.computedColumns] section is used to specify additional columns that are computed by the server when updating a work item template. These do not need a value.

[tfs]
host = http://myserver:8080
user = DOMAIN\username  
password = myPassword
regexp = (?is)Work ?Items?: (.+)$
template = Fixed in revision {node|short}.

[tfs.columns]
CodePlex.UpdatedBy = user_cp

[tfs.computedColumns]
CodePlex.UpdatedBy =

Last edited Apr 25, 2010 at 8:58 AM by matthaw, version 4

Comments

No comments yet.