[PATCH 0 of 1] debugcommands.py

Adrian Buehlmann adrian at cadifra.com
Tue May 10 19:14:56 CDT 2011

On 2011-05-10 22:28, Matt Mackall wrote:
> One of the few things I would consider changing here is the commands
> table. Ideally the command table entries would somehow be stored right
> next to the command definition.



table = {}


def init(ui, dest=".", **opts):
    """create a new repository in the given directory

    Initialize a new repository in the given directory. If the given
    directory does not exist, it will be created.

    If no directory is given, the current directory is used.

    It is possible to specify an ``ssh://`` URL as the destination.
    See :hg:`help urls` for more information.

    Returns 0 on success.
    hg.repository(hg.remoteui(ui, opts), ui.expandpath(dest), create=1)

table["^init"] = (init,
    _('[-e CMD] [--remotecmd CMD] [DEST]'))


would that be acceptable?

If yes, I'd probably do such a full patch if you like that pattern.

More information about the Mercurial-devel mailing list