Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial Pushing closed branches

Tags:

mercurial

I'm trying to figure out why Mercurial thinks I'm trying to create a new remote branch in this situation:

alt text http://a.yfrog.com/img716/8421/9vz.png

Is it just trying to inform me that the branch will show up in the meta-data as a closed branch?

I'm on Mercurial v1.6.1023

Edit: the only branch on the remote repository is named "default"

like image 380
Steve Horn Avatar asked Aug 12 '10 18:08

Steve Horn


People also ask

Can you push to a closed branch?

Closing branches should not by themselves prevent you from pushing. A closed branch is simply a branch that ends in a commit that carries the "closed branch" meta information.

How do I open a closed branch in mercurial?

You can just hg update to the closed branch then do another hg commit and it will automatically reopen.


1 Answers

By default hg push is going to push all changesets in your local repository that are not in the remote repository. If you have some changes on a local branch (Environment_Switching in your case) -- even a closed branch -- they'll go too unless you explicitly exclude them using hg push -b default (assuming you haven't merged that branch back onto default).

To answer your question, it's just a warning that you're creating a new remote branch.

EDIT: hg push -r default and hg push -b default are equivalent. From the output for hg help revs:

Mercurial supports several ways to specify individual revisions. ...text removed for brevity... A branch name denotes the tipmost revision of that branch.

Pushing the tipmost revision of a branch will also push its ancestors, which are the rest of the changesets on the branch.

like image 153
Niall C. Avatar answered Sep 22 '22 06:09

Niall C.