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.
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
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.
Fixed by http://selenic.com/repo/hg/rev/5a20115e7397 Matt Mackall <mpm@selenic.com> rollback: clarify --force text (issue3175) (please test the fix)
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"
--- 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