Mercurial Version Control Integration

Topics: Core
Nov 20, 2012 at 2:49 AM

I have added the hooks and updated the config for the mercurial integration.

I do not see a new tab at the top and when I commit or push changed it does not update BugNet.

Is there something other than what is on the documentation page that is needed to get this working?

Nov 20, 2012 at 3:40 AM

Have you checked the log4net log file?  See the config file for the name of the file it will be either in the same location as the hook or the root of the c: drive.

Nov 20, 2012 at 4:53 AM
Edited Nov 20, 2012 at 2:06 PM

It is not creating a log file in the directory where i have the exe or the root of c:.


Nov 20, 2012 at 2:57 PM

I changed it to go to a certain directory and it never creates the log file. It doesn't appear to be running the hook at all. I have added it to the hgrc.

I am doing a committ from TortoiseHg. Is this the correct way to get the hook to run?

Nov 20, 2012 at 6:14 PM

How do you have Mercurial setup?  I.E distributed?  Something like codeplex where you have Mercurial running on a separate server than your local repository?  Where you clone from the central repo to local -> then you commit to local -> sync with main?

Nov 20, 2012 at 7:24 PM

I have been using a local repository then syncing to bitbucket.

So, the process would be clone to local, commit to local, then sync with bitbucket.

Eventually we will be moving the central repo internal.

Nov 20, 2012 at 10:07 PM

You could try and put the following in the mercurial.ini file found in your user folder (depending on what OS you are on (i.e. Win7 C:\Users\<USER_NAME>)

[hooks] 
changegroup.MercurialChangeGroupHook = "PATH_TO_EXE\BugNET.MercurialChangeGroupHook.exe"

I know when I first started to work on the hook I had a bitch of a time putting the correct settings in the right file.  THe README describes a setup where you have a config like I described above.  I did however get it to work on a local repo (I think) by putting it in the mercurial.ini file.

Nov 20, 2012 at 10:22 PM

I have it in both the mercurial.ini and in the local repository config and it is still not running.

Feb 23, 2013 at 6:44 PM
As I commented on the wiki page and filed an issue at http://support.bugnetproject.com/Issues/IssueDetail.aspx?id=2185 the Mercurial config information is actually inaccurate and I had the same problem.

The configuration shown assumes that you are deploying the hook on your central repository since the changegroup hook is run when changesets are pulled into a repository (e.g. as a result of a hg push). Thus if you are deploying the hook on your local clone you should use the outgoing hook instead so that is runs when you make a hg push i.e.

[hooks]
outgoing.MercurialChangeGroupHook = "PATH_TO_EXE\BugNET.MercurialChangeGroupHook.exe"

This worked for me