Bug 3176 - incorrect(or ambiguous) explanation of "--force" for rollback in online help
Summary: incorrect(or ambiguous) explanation of "--force" for rollback in online help
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: 2011-12-29 01:07 UTC by FUJIWARA Katsunori
Modified: 2012-05-13 05:00 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 FUJIWARA Katsunori 2011-12-29 01:07 UTC
in online help for rollback command, "--force" is explained as:

    To avoid data loss, you must pass --force in this case

but current implementation seems to AVOID rollbacking in
the situation described in help document WITHOUT "--force", 
and to complete rollbacking with "--force" even though such action
causes data loss.
Comment 1 Alexander Sauta 2011-12-29 01:40 UTC
That's funny, but I also noticed this line in .po file this morning)
--
Alexander Sauta

2011/12/29 FUJIWARA Katsunori <bugs@mercurial.selenic.com>:
>
> New submission from FUJIWARA Katsunori <foozy@lares.dti.ne.jp>:
>
> in online help for rollback command, "--force" is explained as:
>
>    To avoid data loss, you must pass --force in this case
>
> but current implementation seems to AVOID rollbacking in
> the situation described in help document WITHOUT "--force",
> and to complete rollbacking with "--force" even though such action
> causes data loss.
>
> ----------
> messages: 18435
> nosy: foozy
> priority: bug
> status: unread
> title: incorrect(or ambiguous) explanation of "--force" for rollback in online help
>
> ____________________________________________________
> Mercurial issue tracker <bugs@mercurial.selenic.com>
> <http://mercurial.selenic.com/bts/issue3175>
> ____________________________________________________
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
Comment 2 Matt Mackall 2011-12-29 13:59 UTC
Well, it is correct if read as:

"we make you use the --force switch so you don't accidentally lose data"

I've queued the following rewrite:

diff -r c072525b726e mercurial/commands.py
--- a/mercurial/commands.py	Wed Dec 28 00:01:48 2011 +0100
+++ b/mercurial/commands.py	Thu Dec 29 13:56:00 2011 -0600
@@ -4866,5 +4866,3 @@
-    It's possible to lose data with rollback: commit, update back to
-    an older changeset, and then rollback. The update removes the
-    changes you committed from the working directory, and rollback
-    removes them from history. To avoid data loss, you must pass
-    --force in this case.
+    To avoid permanent data loss, rollback will refuse to rollback a
+    commit transaction if it isn't checked out. Use --force to
+    override this protection.
Comment 3 HG Bot 2011-12-29 15:00 UTC
Fixed by http://selenic.com/repo/hg/rev/5a20115e7397
Matt Mackall <mpm@selenic.com>
rollback: clarify --force text (issue3175)

(please test the fix)
Comment 4 FUJIWARA Katsunori 2011-12-29 19:35 UTC
Thank you for your explanation and fixing, Matt.

I understand that "to avoid" modifies not "pass --force" itself, but "reason
to force users to use --force" in original document.

rewritten document is clear, so I change status of this issue to "resolved"
Comment 5 Bugzilla 2012-05-12 09:26 UTC

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

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