Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7041155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:00:17+00:00 2026-05-28T02:00:17+00:00

I am using mercurial with named branches, and notice that when I create a

  • 0

I am using mercurial with named branches, and notice that when I create a new branch of default, default is marked as an inactive branch. Eg:

C:\data\solutions\test-repo>hg branches
default                        0:aeec280e6310

C:\data\solutions\test-repo>hg branch feature-branch
marked working directory as branch feature-branch

C:\data\solutions\test-repo>hg com -m "created new branch"

C:\data\solutions\test-repo>hg branches
feature-branch                 1:1cb18d7fa554
default                        0:aeec280e6310 (inactive)

This is a problem because our deployment system shows named branches that are active, which can be deployed from.

How can I keep my default branch “active” ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:00:18+00:00Added an answer on May 28, 2026 at 2:00 am

    The notion of “active” and “inactive” branches is something we’re moving away from in the Mercurial project. The problem is simply that branches can flip back and forth between the two states more or less randomly and at inconvenient times — as you’ve just seen.

    Instead, we’re now focussing on “open” vs “closed”. This is an explicit notion: to close a branch head, you do

    $ hg update feature-branch
    $ hg commit --close-branch -m "passes all tests, ready for merging"
    

    That will add a special changeset that marks the branch head as closed. When all heads on a branch are closed, the branch itself it considered closed and will disappear from hg branches. I recommend closing before merging, please see my named branch guide for a longer example.

    So I suggest you change your deployment system to show open branches (hg branches) instead of active branches (hg branches --active).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two branches in mercurial.. default named |r1 |r2 |r3 -------- named branch
When using Mercurial I sometimes find that it is hard to understand the relationship
I need simple hook for mercurial that checks commit comment using pattern. Here is
I've been using Mercurial for a school project that requires Subversion. Until now, I've
I've always used the named branches feature of mercurial to work with branches, and
I am fairly new to mercurial and version control in general. I am using
Note: I'm using Mercurial as an example here, because that's what I'm trying to
I'm using Mercurial Distributed SCM (version 1.1.2) on my Ubuntu. I'm new to mercurial,
How can I configure a Mercurial server to restrict commits to a named branch
When using mercurial, I'd like to be able to diff the working copy of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.