[Bug 5273] New: hg update moves bookmark
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Wed Jun 22 22:41:50 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5273
Bug ID: 5273
Summary: hg update moves bookmark
Product: Mercurial
Version: unspecified
Hardware: PC
OS: Windows
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: bookmarks
Assignee: bugzilla at selenic.com
Reporter: ajensen at webmd.net
CC: mercurial-devel at selenic.com
When I create a branch, I'm told I probably want to use a bookmark.
Unfortunately, bookmarks and branches do not behave equivalently. When I `hg
update` on a branch, I move to the tip of the branch. When I'm on an active
bookmark and run `hg update`, my bookmark moves.
This causes update to behavior unexpectedly in different situations, which is a
usability bug. The `update` command is doing more than one thing: updating
*and* moving my bookmark. The `update` command should only update to the tip of
what I'm on. If I want to move my bookmark, there should be a parameter on the
`update` command, similar to the `-u` switch on the `pull` command to pull
*and* update.
Because of this behavior, we can't recommend or adopt bookmarks. Some will
argue that we should remind people not to run `hg update` without arguments
when on a bookmark. This is not reasonable. We use Mercurial because of its
simplicity. One of the reasons it is simple is because we don't have to
remember things like this. Most of our users are and will always be novice
source control users and they will never remember, usually because they don't
use it often enough to remember. Even expert users will forget. If I'm on a
bookmark, go on vacation, and come back, the first think I'm going to do is `hg
pull ; hg update`. My bookmark just moved and I may have not even noticed.
We would love, love, love to use bookmarks. Our repository currently has
hundreds of feature branches. If we were to switch to bookmarks, we are going
to get a lot of support requests asking why features, which aren't ready for
live yet, suddenly appeared on the default branch. Because bookmarks don't
leave a permanent record, we'll then have to do some research to figure out
where the bookmark used to be and move it back.
I know the Mercurial developers are very, very reticent to break
backwards-compatibility. I think this is a good time to do it. If you compare
the amount of time people will lose because they have to use a command line
option to update to move their bookmark versus the amount of time people lose
to fixing problems when a bookmark moves unintentionally, I think the change
will be worth it just in terms of the hours you'll save people and
organizations. (Don't believe me? Just look at the history on the Mercurial
mailing list. I know of at least three times someone has written in about the
strangeness of this behavior.)
Please, please, please change this behavior. Add a command line option to the
update command to move a bookmark instead of doing it implicitly.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list