branch locking mk2.

Robert Collins robertc at robertcollins.net
Tue Feb 14 05:34:15 GMT 2006


On Tue, 2006-02-14 at 05:31 +0200, Nir Soffer wrote:
> Some more comments and questions:
> 
> INFO_NAME = '/info'
> 
> self._info_path = path + self.INFO_NAME
> 
> 	transport expect to get posix like path e.g foo/info?

Yes, transport accepts URLs, which always have '/'.

> The module docstring is excellent, it misses example usage of the 
> locks. For example, how to create and lock, how to get a lock with 
> blocking etc.

These should go in 'bzrlib.doc.api.lock-dir.txt' (or a similar named
file).

> Last, this is a problem I see in other places in bzr, it will be hard 
> to reuse this code in another project, because it uses lot of 
> bzrlib.stuff. For example, instead of defining LockContention and 
> friends in lockfile, they are defined in bzr.errors, so code that want 
> to reuse this code will have to either import bzr.errors, or rewrite 
> those errors. Same for the transport - if you want to use this code for 
> the file system, you have to import bzr.transport

In the other project do 'import bzrlib'.

Seriously, we're not writing a bunch of separate libraries, we are
writing bzr & bzrlib, and the single place to find errors has been very
useful for maintenance so far. I don't think its a problem at all that
we have consistency across the codebase like this.

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/20060214/97592769/attachment.pgp 


More information about the bazaar mailing list