Mercurial API Resources and Extensions

I want to write extensions for Mercurial. What are some good resources like tutorials, manuals, API links, or perhaps even an existing extension that is well commented and easy to rely on source code.

So far I have found a short MercurialApi and WritingExtensions wiki.

+4
source share
2 answers

The Mercurial The Definitive Guide, also known as the hg book, contains a section on writing extensions for Mercurial. The book is available for free viewing at http://hgbook.red-bean.com/ .

Edit: My apologies, the hg book only described the use of extensions not writing them. The section on writing hooks in a book can still be useful.

The best way to learn how to write an extension is probably to read the extension code. Pay most attention to extensions that perform functions similar to what you want to implement.

eg. If you are interested in moving from one SCM system to another, check out the hg-git extension.

0
source

As far as I know, in terms of "training materials" for writing extensions there are not many. It’s best to find an extension that does something similar to what you want to write, read the source and find out how it works. You can try to contact the author of the extensions if you are stuck.

0
source

Source: https://habr.com/ru/post/1306827/


All Articles