TortoiseHG v2

Mar 22, 2011 at 5:01 PM

It looks like this isn't working for the new TortoiseHG. Anyone had success with it?

Coordinator
Mar 23, 2011 at 5:26 AM

Hi,

I will make a test and see what's append. Maybe just a change of path?

Mar 23, 2011 at 10:03 AM

Excellent! cheers

Coordinator
Mar 23, 2011 at 6:36 PM

Hi GingaNinja,

I've tested the project with TortoiseHG 2.0.2 and Mercurial 1.8.1 ... seems to work !

Could be great if you can provide me more details about your issue, like:

  • The error message - if any :)
  • The MSBuild task(s) that you are you using
  • Your version of Mercurial
Coordinator
Mar 23, 2011 at 6:43 PM

... and since the version 1.1.1 of the project, you can also have a more detailed log by using the /verbosity:detailed option of MsBuild.

Could be interesting to see what's append with this option and if you have more info about the issue this way.

Apr 5, 2011 at 11:33 AM
Edited Apr 5, 2011 at 11:38 AM

Thanks for looking into this. Just realised that I installed the 64bit version of TortoiseHg. That means it is in Program Files as opposed to Program Files (x86). Would this make a difference?

Anyway, this is the output using /verbosity:detailed

Building with tools version "4.0".

Target "Hg-Revision" in project "C:\Users\username\Documents\hgRepo\project\build.xml" (target "VersionSolutionInfo" depends on it):

Using "HgVersion" task from assembly "C:\Program Files (x86)\MSBuild\MSBuild.Mercurial\MSBuild.Mercurial.dll".

Task "HgVersion"

  Execute the task <HgVersion> with the command <hg summary>

C:\Users\username\Documents\hgRepo\project\build.xml(82,2): error : HgProcessException: The command <hg.exe> is not available\r

C:\Users\username\Documents\hgRepo\project\build.xml(82,2): error : Win32Exception: The system cannot find the file specified\r

C:\Users\username\Documents\hgRepo\project\build.xml(82,2): error :

Done executing task "HgVersion" -- FAILED.

 

The build.xml file has the following for the HgVersion task:

<Target Name="Hg-Revision">

    <HgVersion LocalPath="$(MSBuildProjectDirectory)" Timeout="5000">

         <Output TaskParameter="Revision" PropertyName="Revision" />

        <Output TaskParameter="Changeset" PropertyName="Changeset" />

    </HgVersion>

    <Message Text="Last revision from HG: $(Revision)" />

    <Message Text="Last changeset from HG: $(Changeset)" />

</Target>

Apr 5, 2011 at 11:47 AM

aha, I think I've sussed it. Just looked through the source code. The path that is set by TortoiseHg is c:\Program Files\TortoiseHg\bin - the command is hg.cmd NOT hg.exe. hg.cmd references ..\hg.exe (located in the parent folder). I've made my build work by specifying LibraryPath (C:\program files\TortoiseHg) in my build script.

Is this different for the 32bit version maybe?