Whose distributed VCS is the most distributed?

Adeodato Simó dato at net.com.org.es
Fri Aug 11 03:54:40 BST 2006


Hey John. I just read your article [1], and wanted to point out that,
TTBOMK, your biggest argument against bzr, that it does not preserve
history when branching and merging, only commit logs, is not true. I'm
CC'ing the bzr list just in case there's something wrong below, so that
I can be corrected.

  [1] http://changelog.complete.org/posts/528-Whose-Distributed-VCS-Is-The-Most-Distributed.html

The relevants bits from the article are:

> [Arch and] bzr preserve commit logs but not the individual changesets
> on a new branch. I was particularly surprised at this shortcoming with
> bzr, but sure enough, a standard bzr merge from a remote branch
> commited three original changesets into one and did not preserve the
> individual history on the one commit.

And:

> [Arch and] bzr have the same problem of preserving commit logs, but not
> individual changesets. A merge from one branch to another in Arch or
> bzr simply commits one big changeset on the target that represents all
> the changesets pulled in from the source. So you lose the distinctness
> of each individual changeset. This can result in the uncomfortable
> situation of being unable to re-create full history without access to
> dozens of repositories on the 'net.

The history is certainly preserved; at least, you can access the
individual commits if you so wish, by specifying the full revision-id of
the changeset you'd like to acess to.

I'll reckon it may look at first glance that only the commit messages
are preserved, and the rest is stored as one big diff (this can be a
possible area for improvment, I guess), but the history is definitely
there.

For example, bzr itself is maintained through a patch manager, so every
commit is in fact a merge from a developer's integration branch. But the
branch is certainly complete by itself! For example, to get (from the
log below) the diff for the "Update NEWS" entry, you'd do:

  % bzr diff -r revid:john at arbash-meinel.com-20060731182137-33f7972ede182353..revid:john at arbash-meinel.com-20060731184154-1d0a9110ebc2c82b
  === modified file 'NEWS'
  --- NEWS        2006-07-29 01:20:55 +0000
  +++ NEWS        2006-07-31 18:41:54 +0000
  @@ -202,6 +202,9 @@
      * ``bzr status foo`` when foo was unversioned used to cause a full delta
        to be generated (John Arbash Meinel, #53638)

  +    * ``bzr diff --diff-options`` works around a bug in subprocess.py.
  +      (John Arbash Meinel, #54651)
  +
    INTERNALS:

      * Combine the ignore rules into a single regex rather than looping over

I completely agree this is clumsy, and there's much room for improvement.
For a start, I think there are plans to introduce a -c option, so that
there's no need to specify the revision id you want _and_ the previous
one.

Other improvements could be (maybe this has been discussed before, I
don't know, haven't read the list since the beginning ;-) introducing
sub-revno, as in, output "made up" revision numbers for merged
changesets, like 1903.1, 1903.2, 1903.2.1, etc, and allow for -r to take
those.

Cheers,

------------------------------------------------------------
revno: 1903
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2006-08-01 08:33:18 +0100
message:
  (john) external diff fixes (#54651)
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20060731175940-272658a5e2e4539d
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: external-diff-54651
    timestamp: Mon 2006-07-31 12:59:40 -0500
    message:
      Fix the bug in the NoDiff exception class, and add a test
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20060731182137-33f7972ede182353
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: external-diff-54651
    timestamp: Mon 2006-07-31 13:21:37 -0500
    message:
      Add a test that we can use an external diff program.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20060731184154-1d0a9110ebc2c82b
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: external-diff-54651
    timestamp: Mon 2006-07-31 13:41:54 -0500
    message:
      Update NEWS
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20060731185811-a9976f50e047fc03
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: external-diff-54651
    timestamp: Mon 2006-07-31 13:58:11 -0500
    message:
      Just swallow a return code of 2
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20060731191419-41f78a5c1a394c17
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: external-diff-54651
    timestamp: Mon 2006-07-31 14:14:19 -0500
    message:
      Always buffer the output of diff, so we can check if retcode==2 is because of Binary files
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20060731191536-ca772e434471e8cf
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: external-diff-54651
    timestamp: Mon 2006-07-31 14:15:36 -0500
    message:
      internal_diff always adds a trailing \n, make sure external_diff does too
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20060731191800-2204a749bee1b508
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: external-diff-54651
    timestamp: Mon 2006-07-31 14:18:00 -0500
    message:
      Update NEWS for fixing bug #52930 and bug #54651
    ------------------------------------------------------------
    merged: mbp at sourcefrog.net-20060801054240-4f5cde0964fc5119
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: bzr.merge.54651
    timestamp: Tue 2006-08-01 15:42:40 +1000
    message:
      [merge] john's external-diff fix
    ------------------------------------------------------------
    merged: mbp at sourcefrog.net-20060801062349-f68c7a538bd68855
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: bzr.merge.54651
    timestamp: Tue 2006-08-01 16:23:49 +1000
    message:
      Try again to fix NEWS conflicts


-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Mankind are very odd creatures: one half censure what they practice, the
other half practice what they censure; the rest always say and do as
they ought.
                -- Michel de Montaigne





More information about the bazaar mailing list