branch-formats review

Martin Pool mbp at sourcefrog.net
Tue Jan 31 13:33:55 GMT 2006


http://people.ubuntu.com/~robertc/baz2.0/branch-formats/

+1 from me to merge this into main.

(The tests fail in a merge into bzr.dev because of some recent changes
but this shouldn't be hard to fix; I'll do it while integrating.)

> === modified file 'bzrlib/branch.py'
> --- bzrlib/branch.py	
> +++ bzrlib/branch.py	
> @@ -81,24 +90,38 @@
>      base
>          Base directory/url of the branch.
>      """
> +    # this is really an instance variable - FIXME move it there
> +    # - RBC 20060112
>      base = None

Yes, it is.  It's initialized here to give the default value, because of
the Python behaviour that class variables are seen underlying instance
variables.  I don't particularly *like* this behaviour but it did seem
to be well established. (?)  Maybe we shouldn't do this?

> @@ -123,10 +151,32 @@
>              t = new_t
>  
>      @staticmethod
> +    def create(base):
> +        """Create a new Branch at the url 'bzr'.
> +        
> +        This will call the current default initializer with base
> +        as the only parameter.
> +        """
> +        return Branch._default_initializer(safe_unicode(base))
> +

Should be "at the url 'base'"

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060201/3b6a2ce0/attachment.pgp 


More information about the bazaar mailing list