linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: 2.5 changeset 1.952.4.2 corrupt in fs/jfs/inode.c
Date: Wed, 5 Feb 2003 21:56:13 +0000 (UTC)	[thread overview]
Message-ID: <b1s19t$3it$1@penguin.transmeta.com> (raw)
In-Reply-To: 20030205201055.GL19678@dualathlon.random

In article <20030205201055.GL19678@dualathlon.random>,
Andrea Arcangeli  <andrea@suse.de> wrote:
>
>if you think it's normal the thing sounds very messy. I mean, how can
>a changeset be numbered 1.879.43.1 and not be included in 2.5.59?

You're thinking all wrong.

If you're trying to import BK into a traditional (CVS-like) setup, you
are bound to fail. In fact, it sounds like that is exactly what you're
trying to do, and it looks like you simply don't understand
distribution.

Don't feel bad, none of the CVS/Subversion people seem to get it either.

A revision number clearly _cannot_ be a ID in a distributed environment.
What happens when two people both create 1.1 and try to merge? Something
has to give, and the thing that has to give is the notion that revision
numbers "mean" anything.

Yes, revision numbers do show the tree structure of the SCM, but since
merging (by definition) changes the tree structure, then clearly by
definition the revision numbers have to change on a merge when that
happens. 

Revision numbers do not change if:
 - you only work in one tree (ie use BK as a plain CVS replacement)
 - you only ever merge changes to the top-of-tree (ie no branches)

but immediately when two people have worked on two trees in parallel
without synchronizing at each step (ie true distributed development),
revision numbers _have_ to be fixed up when a merge happens.

So your question is meaningless: "how can a changeset be numbered
1.879.43.1 and not be included in 2.5.59" is simply not a valid question
in a distributed environment.

My current BK tree obviously contains 2.5.59 as a proper subtree. That,
however, does NOT mean that the revision numbers would be a proper
subset.

Think of it this way in a simplified revision tree:

	rev 1.1 <- initial release (call it v2.5.0)
	rev 1.2 <- I made a change, and released it as v2.5.1

Ok. Before I had released v2.5.1, somebody else (say, shaggy), had taken
my 2.5.0 tree, and made his own changes to it. So now _he_ has a tree
that looks like

	rev 1.1 <- initial release (v2.5.0)
	rev 1.2 <- shaggy's private change, based on 2.5.0

So now we decide to merge. Two things can happen: shaggy can merge my
changes, and I can merge his. Let's say shaggy decides to merge my
changes into his tree: that will be his "1.3" point, but the my old 1.2
rev obviously will end up being just a branch to him, and will be a
branch based on our largest common denominator, ie 1.1.

So to shaggy, after the merge, we will have

	rev 1.1 <- initial release (v2.5.0)
	rev 1.2 <- shaggy's private change
	rev 1.1.1 <- my change, tagged as v2.5.1, is just a branch to shaggy	
	rev 1.3 <- merge point

Note how rev 1.2 in my original v2.5.1 tree is now called 1.1.1, and
what is now 1.2 doesn't even _exist_ in my tagged v2.5.1.

>The way I understood it is that when Linus merges "stuff", this "stuff"
>gets a changeset number in the future, not in the past. No matter if the
>"stuff" was created in the past. Is this the case or not?

No.  There _is_ no "future" or "past".  Read up on any distributed
system, and realize that relative time can only be determined by how
fast the interconnect is, and if you have disconnected systems (which is
the whole _point_ of doing distributed SCM), then no such thing can
exist. 

In other words, time does not exist between two distributed SCM trees.
The thing that "gels" the time is the act of merging, and only at that
point do we get a _partial_ ordering of changesets.

It's kind of like the cone of light in relativistic physics, except the
speed of light between two points is arbitrary and depends entirely on
when people decided to merge.  Like in relativistic physics, a totally
ordered "before" and "after" only exist within one frame of reference:
immediately when you look at multiple frames of reference, you get only a
partial ordering, and no equality of time.

			Linus

  parent reply	other threads:[~2003-02-05 21:49 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-05 17:40 2.5 changeset 1.952.4.2 corrupt in fs/jfs/inode.c Andrea Arcangeli
2003-02-05 18:23 ` Andrew Morton
2003-02-05 18:45   ` Andrea Arcangeli
2003-02-05 19:42     ` Dave Jones
2003-02-05 20:06       ` Andrea Arcangeli
2003-02-05 19:43     ` Andrew Morton
2003-02-05 19:51       ` Andrea Arcangeli
2003-02-05 20:09         ` Andrew Morton
2003-02-05 20:18           ` Andrea Arcangeli
2003-02-05 20:33             ` Andrew Morton
2003-02-05 23:29         ` Larry McVoy
2003-02-05 20:11       ` Matt Reppert
2003-02-05 20:24         ` Andrea Arcangeli
2003-02-05 20:56           ` Linus Torvalds
2003-02-05 20:25         ` Linus Torvalds
2003-02-05 23:31         ` Larry McVoy
2003-02-05 23:37           ` Christoph Hellwig
2003-02-05 23:57             ` Larry McVoy
2003-02-06  0:22               ` Robert Love
2003-02-06 16:58               ` Andreas Dilger
2003-02-06 17:30                 ` Larry McVoy
2003-02-06 17:55                   ` Matt Reppert
2003-02-07 16:18                     ` glibc-2.3 [Was: Re: 2.5 changeset 1.952.4.2 corrupt in fs/jfs/inode.c] Horst von Brand
2003-02-07 18:06                       ` Larry McVoy
2003-02-06  0:37           ` 2.5 changeset 1.952.4.2 corrupt in fs/jfs/inode.c Chris Funderburg (at home)
2003-02-06  0:45           ` Alan Cox
2003-02-05 23:51             ` Larry McVoy
2003-02-06  0:02               ` Mitch Adair
2003-02-06  0:08                 ` Larry McVoy
2003-02-06 10:02           ` Nick Craig-Wood
2003-02-09 18:37             ` Kenneth Johansson
2003-02-05 19:46 ` Sam Ravnborg
2003-02-05 20:04 ` Dave Kleikamp
2003-02-05 20:10   ` Andrea Arcangeli
2003-02-05 20:16     ` Dave Kleikamp
2003-02-05 20:34     ` Sam Ravnborg
2003-02-05 20:51       ` Andrea Arcangeli
2003-02-05 22:09         ` Linus Torvalds
2003-02-06 10:46           ` Roman Zippel
2003-02-06 11:09           ` Andreas Schwab
2003-02-05 21:56     ` Linus Torvalds [this message]
2003-02-07 14:56 ` Pavel Machek
2003-02-08 18:28   ` Larry McVoy
2003-02-08 19:36     ` Martin J. Bligh
2003-02-09 10:57     ` Pavel Machek
2003-02-09 14:15       ` Andrea Arcangeli
2003-02-13  1:50     ` Jamie Lokier
2003-02-13  1:57       ` Jamie Lokier

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='b1s19t$3it$1@penguin.transmeta.com' \
    --to=torvalds@transmeta.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 NNTP newsgroup(s).