[PATCH] A path is required to create a repository

Matt Mackall mpm at selenic.com
Tue Nov 8 11:09:16 CST 2011


On Tue, 2011-11-08 at 16:25 +0100, Andrey Somov wrote:
> # HG changeset patch
> # User py4fun
> # Date 1320614743 -3600
> # Node ID 66cfbd0d75f20dab6a0ada8f8baa6d8335c3fcde
> # Parent  f3b5ba25d21787a9e4aa5fc243ecbafc9e978e00
> A path is required to create a repository.
> 
> The API should not give a misleading impression that a repository can
> be created without specifying the path (via the default argument)

...

> -def repository(ui, path='', create=False):
> +def repository(ui, path, create=False):

This works as expected inside an existing repo:

>>> from mercurial import ui, hg
>>> ui = ui.ui()
>>> r = hg.repository(ui)

..and your patch breaks that, so this is the wrong way to fix your
problem.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list