Create repository using Mercurial's API?

Sune Foldager cryo at cyanite.org
Mon Apr 19 08:44:04 CDT 2010


On 19-04-2010 15:42, Sune Foldager wrote:
> 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)

That's mercurial.hg.repository of course :)
/Sune


More information about the Mercurial mailing list