presenting the fundamental abstractions

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


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

James Westby wrote:
> On (12/09/07 14:24), Aaron Bentley wrote:
>> James Westby wrote:
>>> On (12/09/07 09:03), Andrew King wrote:
>>> Another issue that comes up here is "master" branches, i.e. checkouts.
>>> They don't change the nature of the object, and this may not be the
>>> place to explain them, but they are definitely a branch related thing.
>> I think you have the relationship of "master" and "bound" branches inverted.
>>
> 
> Thanks for the clarification, my wording wasn't at all clear. I meant to
> say 
> 
>   Another issue that comes up here is "master" branches, i.e. when you
>   are dealing with checkouts.
> 
>>> All of this is done on any master branch first.
>> Actually, it's mostly done on the local branch first, because the local
>> branch is presumed to be faster than the master branch.
> 
> However lasting changes are first made on the master branch, the work
> done locally is just preparation and building the objects, correct?

Sorry I'm late to this thread...

Yes. We actually commit all the state to the local branch+repository, but don't
update the branch pointer. Then we push all of that data to the master
repository, update the master branch pointer, and then update the local branch
pointer.

I believe we do all of this with a write lock on both the local and the master,
so there should be no real chance that someone would update the master while
you were trying to add a new revision. However, your net connection could go
down, etc. Which would leave some cruft in your repository (the newly committed
but unreferenced data), but the local pointer would not be updated.
It is also possible that the master gets updated (after pulling the data) but
you lose connection before you get to update the local branch. But then you can
just do "bzr update" to pull down the latest master revision.

I'm going into extra detail for James, this is probably far too much for the
document we are writing. Though it might make for a few good examples.
Certainly this could be a good place for some pictures.

bzr commit
<take a write lock on both local and master>
<record the current state to the local repository>
<push the changes to the master repository>
<update the master branch last revision>
<update the local branch last revision>
<unlock>

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/SE8JdeBCYSNAAMRAgrAAJ95oABiu39jMAeVG5DFkRZ/efrjTwCdHoZa
BzJitU0hfZiIuPAyby3A3M4=
=9fwv
-----END PGP SIGNATURE-----



More information about the bazaar mailing list