[PATCH 1 of 2] mq: add qfreeze command to protect patches from careless modification

timeless timeless at gmail.com
Sun Jun 7 10:10:42 CDT 2009


Note: I'm not commenting on whether this is the right thing to do,
merely the English. (Which sadly also has typos which a spell checker
could have caught.)

Personally, I find freeze --release to be unintuitive.

> +    Frozen patch prevents qrefresh, qdelete, qfold and qfinish from
> +    careless modifiction. qrename is allowed, because it does not
> +    modify content.

Use qfreeze to prevent qrefresh, qdelete, qfold and qfinish commands
from accidentally acting upon a patch.
Patches that are frozen can be renamed with qrename because it does
not change the patch's content.

> +    If none of '--series', '--applied', '--unapplied' nor patch name is
> +    specified, qfreeze treats 'qtop' as a target patch.

'nor' isn't appropriate here.

> +    With --release option, this command releases frozen status of target
> +    patches.

omit 'option'

> +    With --list option, this command shows all frozen patches.

omit 'option'

> +    # v(erbosity from implicit target specification)
> +    v = ((opts['series'] and 1 or 0) +
> +         (opts['applied'] and 1 or 0) +
> +         (opts['unapplied'] and 1 or 0))
> +    # c(ombination of target specification)
> +    c = (v + (patches and 1 or 0))

this seems awfully clever....

> +            raise util.Abort(_("-l cannot accept patch specification"))

cannot is strange.

> +            raise util.Abort(_("invalid combination of target specification"))

odd

> +         [('s', 'series', None, _('treat patches in series as targets')),
> +          ('A', 'applied', None, _('treat patches already applied as targets')),
> +          ('U', 'unapplied', None, _('treat patches not yet applied as targets')),
> +          ('r', 'release', None, _('release frozen patches')),
> +          ('l', 'list', None, _('list all frozen patches')),

gah


personally, i'd probably use:

hg qfrozen --freeze patch
hg qfrozen --thaw patch
hg qfrozen --list



More information about the Mercurial-devel mailing list