Tortoise-Hg (mercurial) does not find hg-git - mercurial

I have Tortoise Hg installed on my Windows box, and have been using mercurial via the Tortoise GUI and also from the windows commandline. I installed hg-git as recommended on http://hg-git.github.com/ : Using easy_install hg-git, which built the package with Microsoft Visual C++ 2008. There were no error messages and the build reported success.
I then added the extension to the configuration file. But TortoiseHg still doesn't accept git urls, and when I run hg from the commandline, I get:
*** failed to import extension hggit: No module named hggit
Now, python does know about hggit and will find it if I type import hggit at the interpreter (it fails when hggit tries to import mercurial). I understand that TortoiseHg provides it own python environment, so my question is: How do I install hggit so that it is visible to the tortoise-distributed mercurial? Or am I misdiagnosing the problem?

How did you reference the extension in the .hgrc file ?
If you just did
[extensions]
hggit=
Try adding the complete path to the extension :
[extensions]
hggit = [path-to]/hg-git/hggit
This should tell TortoiseHg exactly where to look and bypass any difference of configuration between the command line and the gui.

Related

Why PhpStorm doesn't see files in /usr/bin?

I'm trying to configure PhpStorm 2019.3, my system is Linux Mint.
When I trying to set paths for utilities Mess Detector (phpmd), Code Sniffer (phpcs) and Mercurial (hg), PhpStorm is saying:
error=2, no such file or directory.
Problem is that PhpStorm doesn't see these files, but see system files.
Utils are installed and placed in /usr/bin
~$ which phpmd
/usr/bin/phpmd
~$ which phpcs
/usr/bin/phpcs
~$ which hg
/usr/bin/hg
Why can that be?
Problem solved by removing phpstorm installed from Program manager and installing directly from official site.

hg-git Installation: Missing dulwich.errors

I'm having trouble with hg-git.
In my hgrc I have:
[extensions]
hgext.bookmarks=
hggit=~/anaconda/lib/python3.5/site-packages/hg_gt-0.8.2-py3.5.egg/hggit
When I try to hgclone I get:
*** failed to import extension hggit from ~/anaconda/lib/python3.5/site-packages/hg_git-0.8.2-py3.5.egg/hggit: No module named dulwich.errors.
I've already installed dulwich.errors by running easy_install 'dulwich>=0.8.0'.
Can't figure out what's going on.
Thanks so much!
You have to be sure that hg, hg-git and dulwich are installed and running in the same python environment. What is saying which hgand which dulwich?
On a Mac and no doubt in similar environments, the PYTHONPATH environment variable must also be set properly, e.g. if dulwich is in /Library/Python/2.7/site-packages/ then PYTHONPATH must include that directory.

Git clone from github

If I want to install a package into Sublime Text 2, I can use the Package Control plugin. But say I want to install a package that is not available through that means.
I am told to 'git clone' from github and the command line is usefully included eg:
git clone https://github.com/mpmont/ci-snippets.git ci-snippets
But I cannot find an explanation of how to use it. I've tried pasting it into the console but just get 'Syntax Error'
I'm using Windows 7.
Help!
You have to install git first.
After you have installed (msys)git, open windows explorer, right click on your target folder and choose "Git Bash". In this shell you can use
git clone https://github.com/mpmont/ci-snippets.git ci-snippets
to clone the repository.
Realize you may just be cloning but you may also add the repository to package control, then install it through that.
To add a repository through package control, open the command palette and enter Package Control: Add Repository. Then input the URL. Note this URL should not contain the .git extension. Then, you can install the package via package control as you would with any other package. Of course, cloning also works, but just thought I would throw this out there if you didn't want to worry about doing all the git stuff.

Make TortoiseHG use my Python installation

I created some python hooks for Mercurial that use some external libraries (namely jira-python). In Linux, I install the packages using pip. In Windows, however, Mercurial comes with a bundled version of Python. My hooks fail when I run them because the external packages are not installed.
I want to make Mercurial / TortoiseHG use my Python installation so I can control its environment. How can I do that?
You can install Mercurial package for Python:
Mercurial 2.4 Python 2.7 package - x86 Windows
Mercurial 2.4 Python 2.7 package - x64 Windows
For TortoiseHG-specific details I can suggest to inspect %TortoiseHg%\library.zip - it contains (some? all?) needed for TortoiseHG|Mercurial Python's modules, which list you can (try) to extend: "in Where is the Python path for TortoiseHG?" topic Steve Borho wrote:
TortoiseHg's entire python environment is contained within the library.zip that comes packaged
with it.
What I suspect you can do is add a line or two to the top of your reviewboard extension file to add your installed python path to sys.path before trying to import simplejson
Hint for adding python path to sys.path is applicable for you too
Recommendation from Convert Extension page
you'll need to use a Mercurial installed on top of a stand-alone Python, and you may also need to do something like
set HG=python c:\Python25\Scripts\hg
to override the default Win32 binaries if you have those installed also
I have Mercurial installed through pip, and I also have TortoiseHg. My system path selects the Python version first.
I renamed C:\Program Files\TortoiseHg\hg.exe to something else, and then ran TortoiseHg. Everything still worked, but I haven't got a good way of verifying it does what you want. You can give it a shot.

Mercurial not configured correctly

I have recently updated to eclipse juno. I have also updated mercurial to its latest version, but it is still giving me problems. The mercurial plugin tells :"Unsupported hg version:1.9.3. Expected is at least2.0.0." but its already updated(see pic).
If I try to commit, it automatically opens preferences window, which gives message :"Mercurial is not configured correctly.Run 'hg debuginstall' to analyse.".
When I do that, it says:"no username supplied". Then I run "hg -y debuginstall", which says, no problems were detected.
Everything that I mentioned is depicted in the picture.
Uncheck the option labelled Use default (built-in) Mercurial executable; then in the text box labelled Mercurial executable below, you can enter the full path to the hg.exe under your TortoiseHg 2.5 installation.
I got the same error when I installed Mercurial Eclipse Plugin. I find the configuration file "Mercurial.ini" in the mercurial installation folder. In my case, the path of that folder is "E:\eclipse\plugins\com.intland.hgbinary.win32_2.3.2\os\win32". Edit the configuration file with notepad and add the line "username = your-user-name" where your-user-name is free to choose. I hope it would help.