Why did "hg push", push my local bookmark to remote?
Bryan Murdock
bmurdock at gmail.com
Fri Feb 6 17:26:54 UTC 2015
On Fri, Feb 6, 2015 at 12:55 AM, Jaikiran Pai <jai.forums2013 at gmail.com> wrote:
> To add to this earlier reply, IMO, it's not about having to add one command
> line option of -s. It's much more than that when there's more than 1
> developer within a team. It's hard to enforce using the -s when it's not the
> default or when it involves having to carefully remember that you are on a
> local bookmark and commits to that bookmark should be secret. I think what
> I'm getting to is that, having a standard default way to isolate/scope
> commits to the local bookmark and be assured that those won't end up to
> remote repo (unless explicitly done) is much more preferable, instead of
> expecting every developer in the team to be using the -s option, IMO.
Don't mess with marking changesets as secret if it bothers you.
That's a mercurial feature that I would guess very few people use.
The one thing that every mercurial user should get used to is
supplying arguments to push every time they use it in order to be
explicit about what they push. Also, don't be shy about using
outgoing to make sure that what you are about to push is what you
expect.
The trade off is that mercurial gives you lots of freedom when
committing. I commit willy-nilly along multiple lines of development
without explicitly creating branches or bookmarks (mercurial won't
hide or garbage collect commits that are not bookmarked or branched
like git does). Since I use fairly decent commit messages (which
everyone should be doing anyway) it's not hard for me to look at log
(or graphlog) output and identify each line of development later. I
can then rebase those lines of development and/or push them as needed.
Yes, I have to be more careful with push than I would if I were using
git, but I never have to stop and create a branch or bookmark before
committing. Since I commit much more often than I push I find this
trade-off to be a great one.
If you really want branches or bookmarks to help you keep track of
things in mercurial they are still available for you (but you do still
need to be careful with push).
Bryan
More information about the Mercurial
mailing list