[PATCH] strip: make it clear that --force discards changes (issue310)

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Apr 29 13:02:02 CDT 2011


On 29 Apr 2011, at 3:00 AM, Patrick Mezard wrote:

> # HG changeset patch
> # User Patrick Mezard <pmezard at gmail.com>
> # Date 1304063769 -7200
> # Branch stable
> # Node ID 9398c5a7741854569e4949d6a8b4a5fd59ec7c53
> # Parent  3eb632d9cf4268beea329e197feb9a1c6b9960f1
> strip: make it clear that --force discards changes (issue310)
> 
> diff --git a/hgext/mq.py b/hgext/mq.py
> --- a/hgext/mq.py
> +++ b/hgext/mq.py
> @@ -2538,7 +2538,8 @@
> 
>     The strip command removes the specified changesets and all their
>     descendants. If the working directory has uncommitted changes,
> -    the operation is aborted unless the --force flag is supplied.
> +    the operation is aborted unless the --force flag is supplied and
> +    the changes discarded.

The wording here is a bit funny; it implies that I have to manually revert the working dir changes before --force will work. How about something like:

the operation is aborted. With the --force flag, uncommitted changes are discarded and the operation proceeds.

>     If a parent of the working directory is stripped, then the working
>     directory will automatically be updated to the most recent
> @@ -3234,8 +3235,8 @@
>           _('hg qseries [-ms]')),
>      "strip":
>          (strip,
> -         [('f', 'force', None, _('force removal of changesets even if the '
> -                                 'working directory has uncommitted changes')),
> +         [('f', 'force', None, _('force removal of changesets, discard '
> +                                 'uncommitted changes')),

This is good, but maybe 'discarding'? Not sure what our usual style is here.

>           ('b', 'backup', None, _('bundle only changesets with local revision'
>                                   ' number greater than REV which are not'
>                                   ' descendants of REV (DEPRECATED)')),

pacem in terris / mir / shanti / salaam / heiwa
Kevin R. Bullock



More information about the Mercurial-devel mailing list