bzr pull when someone is updating repository
John A Meinel
john at arbash-meinel.com
Fri Nov 11 13:53:05 GMT 2005
Alexey Shamrin wrote:
> Hello!
>
> What will happen, if I would "bzr pull" from
> http://bazaar-ng.org/bzr/bzr.dev at the same time as Martin would "bzr
> push" his changes?
>
> Could I end with corrupted branch?
You shouldn't.
bzr uses a little bit of referencing and locking to help prevent corruption.
When updating a branch (with commit or push), the first thing updated is
each individual text weave. Weaves are updated by creating a new one,
and renaming it into place, which should be atomic on most systems.
After that, the inventory is written (so that you can reference the new
texts), and that weave is atomically replaced.
Next, the revision-store is updated with the new revision information,
and the last step is to update the revision-history to include this new
revision.
The way you prevent corruption when downloading is by getting the files
in the reverse order.
If you get the revision-history file first, all entries in that file
exist. If anything is being updated, you might get *more* than that, but
it doesn't really matter.
John
=:->
>
> --
> Alexey
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051111/32f138fa/attachment.pgp
More information about the bazaar
mailing list