Multiple default branches

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Multiple default branches

Post by al2950 »

I have noticed recently that multiple (3) default branches have appeared. Just wanted to check it was not an accident . It looks like it might be a git thing!
User avatar
Zonder
Ogre Magi
Posts: 1172
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 76

Re: Multiple default branches

Post by Zonder »

you can't have more than 1 default :D

sure your local not messed up in some way?
There are 10 types of people in the world: Those who understand binary, and those who don't...
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: Multiple default branches

Post by al2950 »

Although by default you can only have 1 branch head you can force it too have multiple. However you are correct as my repo is really messed up! Not sure how it happened as this repo has only been used for ogre 2.x patches :?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5429
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1337

Re: Multiple default branches

Post by dark_sylinc »

Zonder wrote: Sat Feb 16, 2019 1:06 pm you can't have more than 1 default :D

sure your local not messed up in some way?
That's for git. In Mercurial you can have multiple heads for the same branch, and they're all "valid".

When it comes to the default branch, Pavel works on git and then ports his changes to Mercurial. Sometimes it gets screwed up and an alternate history gets created (i.e. two heads with nearly-identical commit ancestry until the common commit where the split happened appears). When we find out about this, we strip the bad dupe.

But if you pulled from the repo while the dupes weren't fixed, you have to strip the dupes from your local repo as well (using the strip extension, Modify History -> Strip) otherwise it gets messed up, or just clone the repo again from scratch.
If you don't do this and later it happens again, and you pull, you may end up with more than one dupe (i.e. 3 heads, then 4 heads, 5 heads...)
al2950
OGRE Expert User
OGRE Expert User
Posts: 1227
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 157

Re: Multiple default branches

Post by al2950 »

Ah ha, I knew it... Stupid git :wink: !

Thanks for the info