public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: neroden@twcny.rr.com, <gcc@gcc.gnu.org>
Subject: Re: source mgt. requirements solicitation
Date: Sat, 14 Dec 2002 21:34:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0212142009590.2216-100000@penguin.transmeta.com> (raw)
In-Reply-To: <20021215014255.GA1146@doctormoo>


In article <20021215014255.GA1146@doctormoo> you write:
>
>In GCC, we've been known to lose development history when we merge a 
>branch, and merging branches has been incredibly painful.  So I'm not
>sure merging forks is actually harder; merging branches may be. ;-)  

Heh. That's a sad statement about CVS branches in itself.

>Fork merges get submitted as a series of patches (which then need to get 
>approved), and associated ChangeLog entries.  They go in pretty cleanly. 

This is actually not that different from the "old" Linux way, ie the SCM
does _nothing_ for merging stuff. It certainly worked fine for me, and
it's how about half of the Linux developers still work.

The advantage of the SCM-assisted merges is really that when you trust
the other side, it becomes a non-issue.  So to some degree you might as
well think of a SCM-assisted merge as having "write access" to the tree,
except it's a one-time event rather than a continuing process (but
unlike CVS write access it doesn't _need_ to be constant, since both
sides have access to their own SCM structures on their own, and don't
need to merge all the time).

>The fork developer can track his/her own internal change history however 
>he or she likes, but generally will submit an 'expurgated' history for 
>merging, devoid of the false starts, which makes the patches a lot easier 
>to review.  This is in fact an argument in favor of losing 
>development history.  ;-D

We do that with BK too, occasionally. It's sometimes just cleaner to
create a new clone with a "cleaned up" revision history. It's not needed
all that often, but I certainly agree that sometimes you just don't want
to see all the mistakes people initially made.

It's also needed in BK for things like merging from two totally
different repositories - you can't auto-merge just one fix from a
Linux-2.4.x BK tree into a 2.5.x BK tree, for example (when you merge in
BK, you merge _everything_ in the two repositories).  So those have to
be done as patches, kind of like the clean-up thing. 

>>Yet it is the _cheap_ branches that should be the true first-class
>>citizen. Potentially throw-away code that may end up being really 
>>really useful, but might just be a crazy pipe-dream. The experimental 
>>stuff that would _really_ want to have nice source control.
>
>Interestingly, I tend to find that this sort of stuff is exactly what
>*doesn't* need source control; source control simply obscures the 
>process by exposing too much development history, much of which has no 
>relevance to the current version.  Or did you mean code that already 
>works, and is being refined, rather than code in the 'rewrite from 
>scratch every two weeks' stage?

I personally find that _most_ changes by far tend to be fairly small and
simple, and take a few hours or days to do. Yet at the same time, you
want to have access to a lot of the SCM functionality (commit one set of
changes as "phase 1 - preparation", "phase 2 - update filesystems" etc).

At the same time, the tree often doesn't work until all phases are done,
so you do NOT want to commit "phase 1" to the CVS head - and creating a
CVS branch for something that is really not a big project is clearly not
something most people want to do. The pain of the branch is bigger than 
it's worth.

And THIS is where the distributed repository nature of BK really shines.
It's a totally everyday thing, not something odd or special. You can
work in your own repository, with all the SCM tools, and document your
changes as you make them (and undo something if you notice it was
wrong). Yet you do _not_ need to pollute anything that somebody else
might be working on.

And then, when you're ready, you just push your changes to some other
tree (in BK it's an atomic operation to push _multiple_ changesets), and
tell others that you're done.

See? I'm not talking about a big six-month project.  I'm talking about
something that potentially is just a few hours.  You might do your first
cut, and check it into your tree, verify that it works, and then you
might want to go back and make another few check-ins to handle other
cases. 

In gcc terms, let's say that you change the layout of something
fundamental, and you first make sure that the C front-end works. You
check that in and test it (on the C side only) as one stage. Only when
you're happy with that do you even _bother_ to start editing the C++ and
other front-ends.

With distributed trees, it's easy to make these kinds of multi-stage
things. Because nobody else sees what you're doing until you actually
decide to export the thing. With CVS, it's a total _disaster_ to do
this (and the way everybody works is to do all the work _without_ SCM
support, and then try to do one large check-in).

			Linus

  reply	other threads:[~2002-12-15  4:16 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-14 20:16 Nathanael Nerode
2002-12-14 21:34 ` Linus Torvalds [this message]
2002-12-14 23:12   ` source mgt....[_HAS_ gcc relevance] Tom Lord
2002-12-14 22:12     ` Linus Torvalds
2002-12-15  3:04     ` Zack Weinberg
2002-12-15  3:23       ` Tom Lord
  -- strict thread matches above, loose matches on Subject: below --
2002-12-18 17:33 source mgt. requirements solicitation Robert Dewar
2002-12-18  9:58 Robert Dewar
2002-12-18  9:35 Robert Dewar
2002-12-18  9:22 Robert Dewar
2002-12-18  9:07 Robert Dewar
2002-12-18  9:48 ` Linus Torvalds
2002-12-18 10:11   ` Phil Edwards
2002-12-18  9:06 Robert Dewar
2002-12-15 18:29 Nathanael Nerode
2002-12-12  6:43 Robert Dewar
2002-12-08  7:13 on reputation and lines and putting things places (Re: gcc branches?) Robert Dewar
2002-12-08 14:18 ` source mgt. requirements solicitation Tom Lord
2002-12-08 14:56   ` DJ Delorie
2002-12-08 15:02     ` David S. Miller
2002-12-08 15:45       ` Bruce Stephens
2002-12-08 16:52         ` David S. Miller
2002-12-08 15:11     ` Bruce Stephens
2002-12-08 16:24       ` Joseph S. Myers
2002-12-08 16:47         ` Tom Lord
2002-12-08 22:20           ` Craig Rodrigues
2002-12-08 16:09   ` Phil Edwards
2002-12-08 19:13     ` Zack Weinberg
2002-12-09 10:33       ` Phil Edwards
2002-12-09 11:06       ` Joseph S. Myers
2002-12-09  9:42         ` Zack Weinberg
2002-12-09 11:00           ` Jack Lloyd
2002-12-09 15:10     ` Walter Landry
2002-12-09 15:27       ` Joseph S. Myers
2002-12-09 17:05         ` Walter Landry
2002-12-09 17:10           ` Joseph S. Myers
2002-12-09 18:27             ` Walter Landry
2002-12-09 19:16               ` Joseph S. Myers
2002-12-10  0:27                 ` Zack Weinberg
2002-12-10  0:41                   ` Tom Lord
2002-12-10 12:05                   ` Phil Edwards
2002-12-10 19:44                   ` Mark Mielke
2002-12-10 19:57                     ` David S. Miller
2002-12-10 20:02                       ` Phil Edwards
2002-12-10 23:07                         ` David S. Miller
2002-12-11  6:31                           ` Phil Edwards
2002-12-14 13:43                   ` Linus Torvalds
2002-12-14 14:06                     ` Tom Lord
2002-12-14 17:44                       ` Linus Torvalds
2002-12-14 19:45                         ` Tom Lord
2002-12-14 14:41                     ` Neil Booth
2002-12-14 15:47                       ` Zack Weinberg
2002-12-14 15:33                     ` Momchil Velikov
2002-12-14 16:06                       ` Linus Torvalds
2002-12-15  3:59                         ` Momchil Velikov
2002-12-15  8:26                         ` Momchil Velikov
2002-12-15 12:02                           ` Linus Torvalds
2002-12-15 14:16                             ` Momchil Velikov
2002-12-15 15:20                               ` Pop Sébastian
2002-12-15 16:09                                 ` Linus Torvalds
2002-12-15 16:49                                   ` Bruce Stephens
2002-12-15 16:59                                     ` Linus Torvalds
2002-12-15 18:10                                       ` Bruce Stephens
2002-12-16  8:32                                       ` Diego Novillo
2002-12-17  3:36                                         ` Pop Sébastian
2002-12-17 13:14                                           ` Tom Lord
2002-12-16 17:22                                   ` Mike Stump
2002-12-15 17:09                         ` Stan Shebs
2002-12-09 17:50           ` Zack Weinberg
2002-12-11  1:11         ` Branko Čibej
2002-12-08 18:32   ` Joseph S. Myers
2002-12-11  2:48     ` Branko Čibej

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0212142009590.2216-100000@penguin.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=gcc@gcc.gnu.org \
    --cc=neroden@twcny.rr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).