Bug 3327 - hg strip --no-back has short option -n like --dry-run
Summary: hg strip --no-back has short option -n like --dry-run
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-20 05:53 UTC by Geralt
Modified: 2012-05-13 04:49 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geralt 2012-03-20 05:53 UTC
The hg strip option --no-backup uses the same short option (-n) as the --dry-
run option of other Mercurial commands.

In this particular case the --no-backup option on strip does the exact 
opposite of what a naive user (like me) would expect when one executes hg 
strip -n. This is particular bad, because I did rely on the superb user 
interface of Mercurial and never expected to loose all chances of recovering 
from a strip when all I wanted was to see what a strip would actually strip 
from my history.
Comment 1 Frank Kingswood 2012-03-20 06:17 UTC
The hg update, hg revert use -C for --clean/--no-backup.

There are other commands with nonstandard --dry-run behaviour:

The hg merge command has -P for --preview (no merge is performed)
Comment 2 HG Bot 2012-03-22 17:00 UTC
Fixed by http://selenic.com/repo/hg/rev/900eee0778d1
Matt Mackall <mpm@selenic.com>
strip: ignore -n (issue3326) (BC)

(please test the fix)
Comment 3 Bugzilla 2012-05-12 09:29 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:29 EDT  ---

This bug was previously known as _bug_ 3326 at http://mercurial.selenic.com/bts/issue3326