0

I am using Mercurial named branch to mark a big thread of development (CustomerA branch).

When starting work on CustomerB changes (in the same repo), I have forgotten to start named branch (Customer B) from the very beginning.

I have the following history in my repo:

CustomerA-1 > CustomerA-2 > CustomerA-3 > CustomerA-8 > CustomerA-9
                          |
                          > CustomerA-4 > CustomerA-5 > CustomerB-6 > CustomerB-7

Is there any negative impact from leaving it "as-is"? Are there specific practical issues with any Mercurial workflows (merging, switching between branches, cloning, etc) if I leave "4" and "5" changesets "as is", even though logically they belong to CustomerB branch? For example, "5" appears in the list of "hg heads", will it have any adverse impact?

There are good answers on stackoverflow on how to fix it, but I don't want to rewrite history, unless this situation can cause specific pain points in future:

Mercurial move changes to a new branch

Mercurial: Named Branches vs Multiple Repositories

Community
  • 1
  • 1
sbat
  • 1,453
  • 10
  • 21

1 Answers1

0

You are fine. I can't think of any adverse impact that is inherently due to the use of named branches.

  • Thanks for confirmation! One thing I discovered so far is that "CustomerA-5" shows up in "hg heads". However, it does not seem to affect things like "hg update CustomerA", as it seems to figure out fine that A-5 is not a tip. Wonder if it may cause any issues with anything... I'll see what others have to say for next couple of days and will make my one experiments meanwhile. – sbat Apr 09 '13 at 14:44
  • The extra head has nothing to do with using named branch. –  Apr 10 '13 at 03:52
  • I have created an empty repo. Made a couple of commits. Then issued "hg branch testbranch". Immediately after commit, "hg heads" returns two heads. (version 2.2.2). I've checked documentation. "hg heads" indeed returns branch heads (changesets without children in this branch), so creating named branch indeed creates new branch head every time. – sbat Apr 10 '13 at 07:57
  • Alright. `hg branch testbranch` + `hg commit` basically means creating a new branch from the current working directory. A new branch means a new head by definition. If all you want is a name to tag to the current branch, then you need to use bookmarks. –  Apr 10 '13 at 14:36