XP-Dev.com Documentation

Smart Commit Messages

To be able to link commits in your source control with various artifacts, both the artifact and repository need to be in the same project

Linking Commits with Artifacts

To link a commit change with an artifact, all you have to do is add the #<id> of the artifact in your commit message. The #<id> number of the artifact can be found in various places.

For example, to link your change to task #3, all that is needed is to add #3 to your commit message.

The commit change should be displayed under the Commits tab of your story or bug.

Performing Actions on Artifacts using Commit Messages

There are two actions that are supported:

  • Closing artifacts
    To close an artifact, you need to specify the phrase #<id> somewhere in your commit message.
    Examples: Move image to footer. Closes #29 or Fixed #40 - add a synchronised block
  • Adding hours to artifacts
    To add hours to an artifact, you need to specify the phrase #<id> add <hours>h
    Examples: Managed to get the form working again, #21 add 1.5h

You can combine the two above to close and add hours to artifacts simultaneously.
Examples: Use red for the background. Closes #49 add 0.3h will close artifact #49 and add 0.3 hours to it.

Advanced Usage and Hints

  • To link a change to a number of artifacts, just repeat the #<id> of the affected artifacts in the same commit message. For example, did some changes to #45 #22 #99 will add the commit message to artifacts #45, #22 and #99.
  • You can close a number of artifacts by repeating the #<id> of the artifacts in a row. For example, Closes #45 #22 #99 will close artifacts #45, #22 and #99.

Git Repositories

You need to tell Git to use your XP-Dev.com username:

$ cd /path/to/repository
$ git config user.name "my.xp-dev.com.username"

Or to specify it globally:

$ git config --global user.name "my.xp-dev.com.username"

Mercurial Repositories

You need to tell Mercurial to use your XP-Dev.com username.

To do this, edit your hgrc file and specify under the ui section:

username = xp-dev.com.username

For e.g. if your XP-Dev.com is bobthedeveloper then you should specify:

username = bobthedeveloper

Trac Projects

To link a commit to a ticket, you can use the format refs #<ticket-id>, for e.g. refs #123.

To close a ticket, you can use the format closes #<ticket-id>, for e.g. closes #123.

The full list of words and format can be found on Trac's documentation.

Timing and Estimation Plugin

If you're using the timing and estimation plugin, you can add hours to a ticket. The following comments will work to reference tickets and add hours:

  • Blah refs #12 (1) will add 1h to the spent time for issue #12
  • Blah refs #12 (spent 1.5) will add 1.5h to the spent time for issue #12

Feel free to contact us if you need any assistance.