unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: Strange message from "bzr pull"
Date: Thu, 31 Dec 2009 18:39:43 +0900	[thread overview]
Message-ID: <87r5qbo528.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <87iqbpo8bp.fsf@telefonica.net>

Óscar Fuentes writes:
 > Karl Fogel <kfogel@red-bean.com> writes:
 > 
 > >>BzrForEmacsDevs is not simple enough for people who have CVS
 > >>incorporated into their DNA. IMHO it lacks some clear explanation of
 > >>the new concepts (revisions, branches, merges, histories, divergence,
 > >>etc)
 > >
 > > Several places in the document (including the The Other Resources
 > > section) already point to
 > > http://wiki.bazaar.canonical.com/BzrForCVSUsers, which has the material
 > > you describe.
 > 
 > That document is too shallow, barely qualifies as an introduction.

http://doc.bazaar.canonical.com/migration/en/survival/bzr-for-git-users.html
may contain some useful information.  It assumes substantial
familiarity with git, so the very basic stuff is not given there.

 > It doesn't hint at what a revision, for instance. Nobody that reads
 > that document knows that the key information that makes DVCS
 > possible is what you see with
 > 
 > bzr log --show-ids

I agree that the concept that a revision has a universally unique ID
needs to be mentioned, and that a branch knows which IDs it contains,
and can therefore reproduce by updating a working tree.  But the
sentence I just wrote is horrible, nobody who doesn't already
understand will learn anything from it :-), and I don't think a
reference to "--show-ids" will help much.  You need to explain what
those IDs mean.  Specifically, they represented directed arcs in a
graph.

I think that for Emacs developers it may be useful to think of a
"commit" or "revision" by analogy to the Lisp cons.  The "car"
contains a pointer to the revision metadata and the actual content
(files).  The "cdr" is the parent revision.  The obvious part of the
generalization is that the "cdr" may be multiple-valued in the case of
a merge commit, which has multiple parents.  To continue the analogy,
a branch is like a Lisp list, with the root commit being the final
"cons" which has "cdr" of "nil" (ie, it has no parent).

The less obvious part of the generalization is that in a DVCS the
pointer(s) in the "cdr" (and in the "car") are *universal*.  In the
Emacs Lisp implementation those are machine addresses, and they are
implementation details that are only exposed in the debugger.  But in
DVCS, that cannot be so: the communication protocol between different
branches (even on the same host!) needs to use them.  *Every* bzr
branch either assigns the same universal meaning to the id, or it
knows that that id is not part of the branch.

It's true that the information about revision IDs and content IDs
locally may not be of great interest at the moment.  However, they
will automatically be universally valid if you ever push from your
branch, or somebody pulls from it.  It is the universality that makes
*distributed* VCS possible.

N.B.  With respect to git, this description is a pretty accurate
description of the implementation.  For Mercurial and Bazaar, the
implementations are substantially different to support various
features of each DVCS, but all of them do have a concept of the
"history DAG", which is represented by links among "revision objects".




  parent reply	other threads:[~2009-12-31  9:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29  7:43 Strange message from "bzr pull" Eli Zaretskii
2009-12-29 10:18 ` Juanma Barranquero
2009-12-29 10:30   ` Eli Zaretskii
2009-12-29 12:40     ` Juanma Barranquero
2009-12-29 16:24       ` Eli Zaretskii
2009-12-29 17:00         ` Karl Fogel
2009-12-29 18:10           ` Eli Zaretskii
2009-12-29 18:13             ` Juanma Barranquero
2009-12-29 18:34               ` Eli Zaretskii
2009-12-29 19:28                 ` Óscar Fuentes
2009-12-29 19:51                   ` Karl Fogel
2009-12-29 20:04                     ` Óscar Fuentes
2009-12-29 20:15                       ` Karl Fogel
2009-12-29 20:29                       ` Eli Zaretskii
2009-12-29 23:32                         ` Óscar Fuentes
2009-12-30  4:16                           ` Eli Zaretskii
2009-12-30  5:15                             ` Óscar Fuentes
2009-12-31  9:39                       ` Stephen J. Turnbull [this message]
2009-12-29 20:16                   ` Eli Zaretskii
2009-12-29 23:14                     ` Óscar Fuentes
2009-12-30  4:21                       ` Eli Zaretskii
2009-12-30  4:28                         ` Miles Bader
2009-12-30  5:26                         ` Óscar Fuentes
2009-12-29 18:44             ` Karl Fogel
2009-12-29 19:01               ` Eli Zaretskii
2009-12-29 19:09                 ` Karl Fogel
2009-12-29 20:09                   ` Eli Zaretskii
2009-12-30  7:02                     ` Eli Zaretskii
2009-12-30 12:19                       ` Juanma Barranquero
2009-12-30 15:05                         ` Eli Zaretskii
2009-12-30 15:19                           ` Juanma Barranquero
2009-12-31 19:36                           ` Karl Fogel
2009-12-31 20:49                             ` Juanma Barranquero
2009-12-29 21:37                 ` Stefan Monnier
2009-12-31  9:43                   ` Stephen J. Turnbull
2009-12-29 18:02       ` Eli Zaretskii
2009-12-29 18:12         ` Juanma Barranquero

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87r5qbo528.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).