On Mon, 20 May 2019, Jakub Jelinek wrote:

> On Mon, May 20, 2019 at 10:16:26AM +0200, Richard Biener wrote:
> > There's not many details there but I always thought that the
> > "interesting" parts of the GCC history (official branches and trunk)
> > do _not_ contain merge commits so the GCC history forms a tree
> > rather than a DAG.  (I'm not sure if there's an easy way to verify
> > whether there are any merge commits on a specific branch)
> 
> Some people do merge commits to release branches, or even to trunk.
> I see svn:mergeinfo property e.g. on the following branches:
> gcc-4.4 /trunk:155835,156042
> gcc-4.7 
> /trunk:185428,186391,186587,187608,187999,190407,190800,191014,197180,197284,206124-206126
> gcc-4.8 /:197284 
> /trunk:197180,197284,197677,197951,202766,204547,206123-206126,206395,206628,207387,210668,211733,215049
> gcc-4.9 /branches/gcc-5-branch:230092 
> /trunk:210615,210668,211733,214798,215049,215136,215176
> gcc-5 /trunk:222186,230397,231455,232818,241491,243528,243962,244001
> gcc-6 /trunk:239173,239656,241491,243962,244001,249272
> gcc-7 /branches/gcc-8-branch:262746-262747 
> /trunk:249272,249411,250097,253187,253451,254099,254866,262104,262442,262744
> gcc-8 /trunk:260603,262104,262221,262442,262744
> Current trunk doesn't have svn:mergeinfo, but in the past I've removed it
> several times.  I see e.g. r250835, r249115, r249050, r236795, r210113, ...
> 
> Would be nice if during the conversion we could say we want to ignore
> svn:mergeinfo on some branches altogether.

That's the "unmerge" facility in reposurgeon (remove all parents of a 
commit other than the first parent).  It should be easy to apply it to all 
merge commits on a given list of branches.  (Merge commits should be kept 
for development branches.  It's just trunk and release branches for which 
our practice is to avoid them and making them linear would seem 
reasonable.)

(The documentation of "unmerge" says its selection set must resolve to a 
single commit.  This would seem to be a case for allowing it to apply to a 
selection set with multiple commits, i.e. all merge commits on certain 
branches.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to