4/9/2023 0 Comments Tortoisehg set password![]() ![]() This way, you have full control over hook execution for each repositories. You need to change Python script to change variables “ btnet_username“, “ btnet_password” and also change the Web.config file in Bug Tracker to change “ MercurialHookUsername“Ĭreate the hooks for each repository separately instead of creating a hooks in Global Settings in Mercurial. You may want to create a separate username/password using which Mercurial communicates to Bug Tracker. You may also change the location of log file within the Python script. Depending on your Operating system, the location may vary. Log file is created at “C:\users\USERNAME\AppData\Local\Temp\SOME_TEMP_FOLDER\btnet_hg_hook_log.txt”. If not, you would get 401 unauthorized error. I have Windows Authentication and anonymous access both are turned on. If you have Windows Authentication enabled, you need to make sure that hg_hook.aspx file has anonymous access turned ON. (What if you change the location of repository?) If you want to use, Bug Tracker author’s Python script, you need to create a copy of the script for each repository because you will need to hardcode the repository path. If you are using the Python script modified by me, that single script will work for all the repositories on that server because I have modified it to get the current working directory which is always set as a repository directory by Mercurial. Whenever you COMMIT or PUSH to this repository, it will execute this hook and update the bug tracker with the changeset information. Open Windows Explorer and go to the repository for which you want to integrate Bug Tracker, right click on that repository > TortoiseHg > Repository Settings > Hooks > New Hook and then set Hook type = “commit”, Tool name = “hg_hook_for_btnet” and command = “ BUGTRACKER_INSTALLATION_PATH/mercurial/hg_hook_for_btnet.py“Īdd a another Hook for Hook type = “incoming”, Tool name = “hg_hook_incoming” and command = “ BUGTRACKER_INSTALLATION_PATH/mercurial/hg_hook_for_btnet.py“Īt this point, you have successfully integrated Mercurial with Bug Tracker. You download the mercurial hook for btnet python file that I have modified to clarify and enhance the functionality OR you can open file “ BUGTRACKER_INSTALLATION_PATH\mercurial\hg_hook_for_btnet.py” and edit the values for “ btnet_username“, “ btnet_password“, “ hg_path“, “ btnet_url“, “ this_repository_url” (If you are using file that I have modified, you don’t need to change the value of this variable), ![]() Open Web.config file from “ BUGTRACKER_INSTALLATION_PATH/If you don’t want to change the username using which Mercurial access Bug Tracker Website, leave the “ MercurialHookUsername” as “ admin” or change it as per what you want.įrom “ BUGTRACKER_INSTALLATION_PATH\mercurial“, copy the file “map-cmdline.btnet” into “ MERCURIAL_INSTALLATION_PATH\templates” directory ![]() For Bug Tracker, you may want to customize connection string and smtp server value I am not elaborating more on this because it should be a straight forward installation. Here comes a step by step guide to integrate Mercurial and BugTracker.NET You may also create your own script or a little exe/PowerShell script to mimic the same logic and it would work with this tutorial without any problem. To integrate BugTracker and Mercurial, you need to install Python in order to utilize the python script developed by BugTracker author which comes with the installation. Please note that bugtracker is installed on E drive but Mercurial and Python are installed on C drive. Python Windows X86-64 MSI Installer (2.7.5) Mercurial 2.7.2 Inno Setup installer – 圆4 Windows – does not require admin rights Mercurial – 2.7.2 (64 bit) with TortoiseHg 2.9.1 Windows Server 2008 R2 Standard Service Pack 1 (64 bit) After lots of trials and errors, I finally have it working so I am presenting a full guide that worked for me. On the internet I could not find a single place where I could find a comprehensive guide to integrate both the systems. Recently I had a need to integrate Mercurial and BugTracker.NET so that I can view all the bugs and changeset information at one place.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |