Mercurial: how to push to default branch? -


i'm using mercurial , bit of newbie. committed change repo successfully, ran hg pull , hg update - no merges , no conflicts showed up.

then tried push remote repo, , got dreaded: abort: push creates new remote heads!

hg glog shows following:

@  changeset:   576:c4c58970f141 |  tag:         tip |  user:        me |  parent:      566:70e287df5439 | | o  changeset:   575:7ae70ddd2b6e | |  branch:      mongo | | | o  changeset:   574:904da90475ef | |  branch:      mongo | | | o  changeset:   567:cad7a006965b |/   branch:      mongo | o  changeset:   566:70e287df5439 |  user:        me |   

looks has created new branch in repo, fine: want push changes default branch, don't know how.

how can push changeset 576? need specify it's branch default?

mercurial's push command has -r option limit push changes given revision:

if -r/--rev used, specified revision , ancestors pushed remote repository.

this implicates limit branch you're going push. push changes tip of default branch, run:

$ hg push -r default 

this ignore mongo branch. instead of branch names, can use specific revisions:

$ hg push -r 576 

obviously, long revision 576 tip of default branch, both commands have same effect.

on side note, there handy shortcut push parent revision of checked out working copy, using period revision specifier:

$ hg push -r . 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -