rename default branch

Greg Ward greg-hg at gerg.ca
Thu Apr 22 13:54:49 CDT 2010


On Thu, Apr 22, 2010 at 9:11 AM, James P. Howard, II <jh at jameshoward.us> wrote:
> Like a good little grad student, I am writing my proposal and
> dissertation in LaTeX and have the good sense to deploy Mercurial on
> this at the start.
>
> Given that the dissertation is a superset of the proposal[1], it seems
> to me that my plan should be to operate in the default branch until
> such time as the proposal and dissertation diverge (likely before the
> proposal is finalized).  So it makes sense to me that I should rename
> the default branch to "proposal" and then branch "dissertation" from
> it at some future date.
>
> With this in mind, how do I rename default to something meaningful?

If you haven't started work yet, it's easy:

  hg init thesis
  cd thesis
  hg branch proposal
  [work work work]
  hg branch dissertation
  [some more work]
  [submit]
  [graduate]

If you *have* already committed on default, then your only hope is an
hg->hg conversion using a branchmap to rename your branch.  The
resulting repo will NOT be compatible with your old one, i.e. the
changeset IDs will be different.

Greg


More information about the Mercurial mailing list