Keep Unfinished Mercurial Commits Out of Pushes with Phases
Prevent unfinished Mercurial changesets from reaching your team by using draft and secret phases before you push.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Prevent unfinished Mercurial changesets from reaching your team by using draft and secret phases before you push.
Mercurial's phases system (public/draft/secret) attaches immutable metadata to each changeset, preventing accidental rewrites of shared history without server-side hooks. Unlike Git's branch protection, safety travels with the data.
Mercurial phases label each changeset as draft, secret or public to prevent accidental publication and support safe history rewriting in team workflows.
Mercurial's phases system prevents accidental history rewriting by classifying changesets as public, draft, or secret. This guide explains the mechanism with a worked example, configuration, and common mistakes.
Learn how to use Mercurial’s phases (draft, secret, public) to prevent accidental pushes of unfinished work and choose the right state for each changeset in a collaborative workflow.
Mercurial push failures and "can't rebase public changesets" errors usually trace back to the phase system. Learn to diagnose draft, secret, and public states and fix them safely.
Learn how Mercurial’s phase system lets you commit unfinished work locally, promote it when ready, and avoid accidental exposure while keeping history clean.