[issue659] update: --clean is overloaded and badly documented
Malte
mercurial-bugs at selenic.com
Sun Jul 29 07:50:54 CDT 2007
New submission from Malte <malte at gmx-topmail.de>:
The behaviour shown below does not make sense to me as a user. The clean option
to “hg update” has two totally unrelated effects: Allow to go sideways in
history, and lose changes to the working directory. Only the second effect is
documented.
$ hg status
$ hg update side_branch
abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes
$ hg update -C side_branch
$ hg help update | grep -- -C
hg update [-C] [-d DATE] [[-r] REV]
-C --clean overwrite locally modified files
Furthermore I personally find the “abort” message above confusing/unclear. I
suppose it tries to tell me that the branch I'm going to update to is a parallel
branch, so I'm likely to want “hg merge” instead, and I should use “hg update
-C” if I really want to check out the parallel branch. But I do not want to
lose changes, so why should I do “update -C”?
Suggestions for improvement:
a) Do not disallow checkouts of parallel branches, only print a notification
like: “Warning: You might have wanted to merge instead.”
b) Do disallow checkouts of parrallel branches, but introduce a new option (say,
-f --force) that behaves like -C, but does not throw local changes away. Also,
let -C only do what it should do according to its documentation.
----------
messages: 3640
nosy: Malte
priority: bug
status: unread
title: update: --clean is overloaded and badly documented
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue659>
____________________________________________________
More information about the Mercurial-devel
mailing list