Why did "hg push", push my local bookmark to remote?

Jaikiran Pai jai.forums2013 at gmail.com
Fri Feb 6 07:05:53 UTC 2015


On Friday 06 February 2015 11:50 AM, Jaikiran Pai wrote:
>
>> You probably want to create an alias called 'nudge':
>>
>> ~/.hgrc:
>>
>> [alias]
>> nudge = push -r .
>
> So would that mean, I would do:
>
> hg bookmark "foo-bar" // new bookmark
> hg up foo-bar // up to the bookmark
> .. do changes
> hg commit -m "test commit to bookmark"
> hg nudge
>
I gave this a try but unfortunately, the result was the same, my commit 
ended up in the remote repo. Here's what I did:

hg bookmark new-foo-bar // new bookmark
hg up new-foo-bar // up to new bookmark
... do changes
hg commit -m "expected to be a commit in my bookmark"
hg push -r . upstream // upstream is the  remote repo shared by the 
entire team

It ended up pushing that commit to the remote repo and available for others.

-Jaikiran



More information about the Mercurial mailing list