ubuntumbedhg-git

How do I remove hg-git entirely from Ubuntu 18.04.2


When using mbed-cli to update an Mbed repo, I get the following error:

john@john-ThinkPad-Yoga-11e:~/Projects/myRepo$ mbed update
[mbed] Working path "/home/john/Projects/myRepo" (program)
[mbed] Updating program "myRepo" to latest revision in the current branch
[mbed] Updating library "mbed-os" to rev #c966348d3f9c (tag: mbed-os-5.11.1)
*** failed to import extension hggit from /path/to/hg-git: [Errno 2] No such file or directory: '/path/to/hg-git'
*** failed to import extension hggit from /path/to/hg-git: [Errno 2] No such file or directory: '/path/to/hg-git'

I do not want to use hg-git and have tried to remove it entirely. Mbed-cli uses Python so I tried various Python tools to remove hg-git but am still getting the error. I am not even sure it is actually an error from mbed-cli as it appears after things that I know are part of mbed (ie, lines starting with "[mbed]"). I also tried to find the source of the error in a file (using 'grep -rnw . -e "hg-git"') but as a bit of a newb on Ubuntu I have not been able to do so.

Any ideas as to the source of the error message and/or how I might get rid of it and remove hg-git in its entirety?


Solution

  • The hggit extension is still enabled in the Mercurial configuration.

    You can show the file and line of where the configuration is set by running: hg config extensions.hggit --template '{source}\n'.

    It may return something like /home/user/.hgrc:12. In this case, you have to remove or comment out line 12 in the file /home/user/.hgrc to disable the hggit extension.