Aloha!
Hg is a fine DVCS that is also a python module. This allows us to do ''import mercurial'' and load hg into our own application. My idea was to use mercurial within a Python application to create a revision controlled storage for my application.
However my google-fu semms to fail me. I can't find any documentation, tutorial or examples of how to use hg as a module in Python providing functionality. help(mercurial) lists the normal commands and dir() provides some hints of methods.
But do you for example create files for backing store, or do you get another type of data structure that works as a Hg repo?
There seems to be great potential for neatness having this functionality. But how?
API is mostly undocumented, and using it might require you to release your code as GPL — see https://www.mercurial-scm.org/wiki/MercurialApi. The preferred (and more backwards compatible) way is to call hg CLI frontend.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With