开发者

Mercurial API and Extensions resources

开发者 https://www.devze.com 2022-12-26 12:45 出处:网络
I want to write extensions for Mercurial. What are good resources such as tutori开发者_如何学编程als, guides, API reference or maybe even a existing extension that is well commented and easy to lean f

I want to write extensions for Mercurial. What are good resources such as tutori开发者_如何学编程als, guides, API reference or maybe even a existing extension that is well commented and easy to lean from the source.

So far, I have only found the short MercurialApi and WritingExtensions wiki pages.


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

Edit: My apologies, the hg book did only describe using extensions not writing them. The section on writing hooks in the book may still be useful though.

The best way to learn how to write an extension is probably going to be reading extension code. Focus the most attention on extensions that perform functions similar to what you want to implement.

e.g. If your interested in converting from one SCM system to another take a look at the hg-git extension.


As far as I know, there isn't a lot in the way of 'learning materials' for writing extensions. Your best bet is probably to find an extension that does something similar to the one you want to write, read the source and figure out how it works. You can try contacting that extension's author if you get stuck.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号