HgVersion Task

Extracts the current Changeset ID and revision number of a Mercurial workspace.

Inputs

Property Type Description Required
LibraryLocation string the path of the hg.exe command no
LocalPath string the local working copy yes
Timeout int the timeout for the task in milliseconds no

Outputs

Property Type Description Required
Changeset string the changeset identifier of the current workspace no
Revision int the revision number of the current workspace no

Remarks

This method use the hg summary command.
The name of the task conforms to the community standards as the MSBuild Community Tasks uses TfsVersion, SvnVersion as the name of the same kind of tasks.

Sample

Initialize the AssemblyRevision property with the revision number of the folder containing the current MSBuild project:

            <HgVersion LocalPath="$(MSBuildProjectDirectory)" Timeout="5000">
              <Output TaskParameter="Revision" PropertyName="AssemblyRevision" />
            </HgVersion>

Last edited Mar 27, 2010 at 1:27 PM by Faz, version 3

Comments

No comments yet.