setting revision history API usage hint
Robert Collins
robertc at robertcollins.net
Mon Nov 28 11:28:14 GMT 2005
While merging into storage, I saw several of these:
something_to_become_revision_history = \
AtomicFile(branch.controlfilename('revision-history'))
This is a really hard way of doing:
branch.lock_write()
try:
branch.set_revision_history(rev_history)
finally:
branch.unlock()
Please please please don't use AtomicFile or other things to fiddle in a
branch's space: use the lock_write and lock_read apis, and then use the
branches normal apis: they will take care of Atomic behaviour as needed.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051128/829c1fbc/attachment.pgp
More information about the bazaar
mailing list