Bug 2372 - pushing new bookmark branch needs --force
Summary: pushing new bookmark branch needs --force
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: 2010-09-11 02:05 UTC by GeorgBrandl
Modified: 2014-01-06 10:49 UTC (History)
9 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 GeorgBrandl 2010-09-11 02:05 UTC
I'm not sure what the official policy about bookmarks behavior is,
but if they are supposed work like lightweight branches, --force should not
be needed when exporting a bookmark that starts a new branch.
Comment 1 Martin Geisler 2010-09-11 03:27 UTC
I agree with you. As I see it, we warn users when they push changesets that
will end up as anonymous heads in a repository. This is to prevent people
who subsequently clone the repository from wondering which head they want to
use.

So if a head is named via a bookmark, then I think we should allow it to be
pushed. On the other hand, pushing it without a warning differs from how we
handle the creation of new named branches: there you need --new-branch flag.
I'm not sure what the argument is for requiring --new-branch, so I am also
not sure why you would need a flag for pushing multiple bookmarked heads.
Comment 2 James Mills 2011-03-15 19:38 UTC
I tend to agree with this. I think no warning
needs to be displayed nor should --force be
required when publishing new bookmarks that
create a new head.

I often want to publish new bookmarks to
a bitbucket repository and I would have
expected hg push -B my_bookmark to "just work".
Comment 3 Bugzilla 2012-05-12 09:12 UTC

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

This bug was previously known as _bug_ 2372 at http://mercurial.selenic.com/bts/issue2372
Comment 4 Matt Mackall 2013-07-27 19:35 UTC
Unassign some bugs with no activity.
Comment 5 Prasoon Shukla 2013-12-20 02:10 UTC
Patch has been filed.

http://markmail.org/message/osli572jxcdlbsrj
Comment 6 HG Bot 2013-12-20 16:00 UTC
Fixed by http://selenic.com/repo/hg/rev/a14d93b2fb1b
Stephen Lee <sphen.lee@gmail.com>
bookmarks: allow push -B to create a new remote head (issue2372)

Push is currently allowed to create a new head if there is a remote
bookmark that will be updated to point to the new head. If the
bookmark is not known remotely then push aborts, even if a -B argument
is about to push the bookmark. This change allows push to continue in
this case. This does not require a wireproto force.

(please test the fix)