Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check which branch you are on with mercurial

Tags:

What is the best way to check which branch I am on with mercurial?

hg log -l 5

This seems to show me the latest commits in the repo and not about working state as git would, so I'm looking for something like git status I suppose, which would tell me what branch I am on. hg status doesn't show me anything.

like image 441
erikvold Avatar asked Dec 27 '15 20:12

erikvold


People also ask

How do I change my branch on mercurial?

Quickly switch to another branch or bookmarkIn the Status bar, click the Mercurial Branch widget to open the Branches popup. Select the branch or bookmark to which you want to switch and in the menu that opens, click Update.

What is a branch in Mercurial?

Branches occur if lines of development diverge. The term "branch" may thus refer to a "diverged line of development". For Mercurial, a "line of development" is a linear sequence of consecutive changesets. Combining a line of development into an existing one is called merging. Creating a branch.

How do I close my HG branch?

the only way to do this is to delete it, or to hope they see the final merge commit and understand that the branch is closed to further development.


2 Answers

You can use the hg identify command with the -b for branch option:

C:\Some\Repository> hg identify -b
default
like image 158
Lasse V. Karlsen Avatar answered Nov 12 '22 05:11

Lasse V. Karlsen


hg branch. I suggest at least reading hg help once :^)

like image 45
Mark Tolonen Avatar answered Nov 12 '22 06:11

Mark Tolonen