[PATCH] mq: introduce the qunmanage command

Patrick Mézard pmezard at gmail.com
Fri May 30 12:26:20 CDT 2008


Dirkjan Ochtman a écrit :
> # HG changeset patch
> # User Dirkjan Ochtman <dirkjan at ochtman.nl>
> # Date 1211966794 -7200
> # Node ID 1e626c9876da7bbb501177dc47ceea7af5ea68df
> # Parent  2b7e8a964109148ce5ca5696df69cb12fe331e9a
> mq: introduce the qunmanage command
> 
> diff -r 2b7e8a964109 -r 1e626c9876da hgext/mq.py
> --- a/hgext/mq.py	Wed May 28 10:57:22 2008 +0200
> +++ b/hgext/mq.py	Wed May 28 11:26:34 2008 +0200

[...]

> @@ -2167,6 +2196,35 @@
>          finally:
>              q.save_dirty()
>  
> +def unmanage(ui, repo, *revrange, **opts):
> +    """move applied patches into repository history
> +
> +    Stops managing the specified revisions (corresponding to applied
> +    patches) in mq and converts them to regular changesets.
> +
> +    Accepts an optional revision range. If no arguments are given, all
> +    applied mq revisions are removed from mq control. 

Not anymore.

> The given revisions
> +    must be at the base of the stack of applied patches.
> +
> +    This can be especially useful if your changes have been applied to an
> +    upstream repository, or if you are about to push your changes to upstream.
> +    """
> +    if not opts['applied'] and not revrange:
> +        ui.status(_('no revisions specified\n'))
> +        return 0
> +    elif opts['applied']:
> +        revrange = ('qbase:qtip',) + revrange

Any reason not to overwrite revrange completely ?

--
Patrick Mézard



More information about the Mercurial-devel mailing list