For a workflow like this,
$hg clone <bitbucket repo>
... fix, fix ...
$hg commit -m "good comment!"
$hg bookmark stable
...new fix on stable...
$hg commit -m "new fix on stable bookmark"
$hg bookmark experimental --> I would like to defer merging until its stable.
... hack hack more hack ....
$hg commit -m "more hack on experimental"
$created new head
$hg push <bitbucket repo>
"abort: push creates new remote heads!"
(did you forget to merge? use push -f to force)
I've read a lot saying 'NEVER EVER use push -f to force'.
But yes, the experimental head needs to be pushed, as I don't want to merge untill its stable enough. I don't want to keep the changes on this bookmark on my machine for too long either (what happens if system got crashed?) and I'd like pull this bookmark and continue experiments later. Its a kind of 'centralized' approach though. Whats the best way to deal with kind of situation ? Is there any way to use bookmarks to deal this workflow? Don't want to use named branch.
Note: I just used 'push -f', but Bitbucket never shows this bookmarks on repositories 'Tags' link.
What you're doing is just fine. The "don't use push -f
" is advice for people who have pulled, have multiple heads, and don't know what that means.
Bookmarks won't show up on bitbucket. The changesets will show up as heads, of course, but the boomarks aren't stored in the repo. When two version 1.6 or later Mercurial's push/pull changesets they transfer bookmarks out-of-band, but bitbucket doesn't have support for that yet (to my knowledge).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With