Create repository using Mercurial's API?

Sune Foldager cryo at cyanite.org
Mon Apr 19 08:42:07 CDT 2010


On 19-04-2010 15:27, Stodge wrote:
> Is it possible to create a repository using Mercurial's API? I'm
> writing some Python scripts to automate various things (create repo,
> configure WSGI etc) and this would make my life much easier. Thanks

Yes. Create an ui object (ui = mercurial.ui.ui()), and then
repo = hg.repository(ui, '/some/path', create=True)

/Sune


More information about the Mercurial mailing list