On Sunday 01 May 2011 18:11, Dietmar Schwertberger wrote: > Am 01.05.2011 02:47, schrieb Shawn Milochik: >> Look at the big two sites for open-source repositories -- github and >> bitbucket. One's git, the other Mercurial. I don't think you can go >> wrong picking either one. > > Can any of those be used from Python as a library, i.e. something like > import Hg > r = Hg.open(path) > > When I had a look at Mercurial, which is implemented in Python, > it was implemented in a way that I could not do that. It was implemented > as rather monolithic program which could be used from os.system(...) > only.
After noting the warnings it contains, see the following page for a description of the Python API for Mercurial: http://mercurial.selenic.com/wiki/MercurialApi Git also has a Python API, which is fairly reasonable to use, though a bit different to the Mercurial one: http://www.samba.org/~jelmer/dulwich/ I've used both with some success. David -- http://mail.python.org/mailman/listinfo/python-list