presenting the fundamental abstractions

John Arbash Meinel john at arbash-meinel.com
Fri Sep 28 16:56:09 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
>>> 1. Revisions -
>>>
>>> At its most basic, bzr tracks revisions. A revision is a set of
>>> changes to one or more files, with associated metadata (such as the
>>> author).
>>>
>>> A simple example of a revision may be adding a single file, or
>>> changing one line in a file. More complicated revisions could be
>>> additions, deletions and changes to hundreds of files.
>> I actually do not think this is 100% right. It's right "enough" for
>> understanding.
>> But, I think a revision is not the changes to one or more files, but
>> rather the current state of all files in a branch at the point in time
>> when that commit was done (unless it was a partial commit of course).
>> To get to the changes, you need to compare this revision with the one before.
> 
> I'd say: a revision is a commit message, userid, the date of the
> change and similar metadata, plus a reference to the contents of the
> tree after the change.  To find out what was changed in the tree, we
> compare the tree to the one preceding that revision.
> 

I think we could call a Revision a 'snapshot' of the tree state, with metadata
including a reference to its parent.

I do think we want to be clear that revisions aren't patches/deltas (though
they may be stored that way).

The fact that it is a state is what gets us into some trouble with deleted
entries. Because people see it as an action "the file was there => now it is
not", but to a "snapshot" it just doesn't see that record at all. (There is no
place to have a deleted entry in a snapshot.)

It also might make it a little bit clearer why cherry picking is a bit harder.
(a branch in darcs is the set of patches that make it up, so you can add any
new patches you want, rather than a snapshot of states, the biggest problem is
that this scales O(history) since you have to talk about the whole set, rather
than just the tip node in a DAG.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/SQZJdeBCYSNAAMRAp9OAJsESFMbYU6l0zp3T3ogP1G51NpKrgCcCGF3
Yp6H7BOuX6hnevdZKuCu0Eo=
=oZUN
-----END PGP SIGNATURE-----



More information about the bazaar mailing list