[MERGE] RepositoryFormat.network_name.

John Arbash Meinel john at arbash-meinel.com
Thu Feb 19 14:27:53 GMT 2009


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

Robert Collins wrote:
> This branch adds a RepositoryFormat.network_name method. We'll need a
> similar thing for BranchFormat and BzrDirFormat eventually, but this
> seems robust and complete for now. We use this in network streaming
> (coming in a later patch) so that the server can determine the encoding
> of the stream. [Note that issues relating to formats the server and
> client don't have in common are orthogonal to this patch - a client
> could send a format that is wire compatible with its stream but older
> [or newer] than the actual disk format, if desired].
> 
> Separately to the streaming case, this patch is a prerequisite for
> having the server create repositories directly rather than doing it via
> VFS methods.
> 
> -Rob
> 

BB:comment

I think having some sort of "network_name()" is a good thing. I'm a bit
concerned about this:
+    def network_name(self):
+        """The network name for this format is the control dirs disk
label."""
+        return self._matchingbzrdir.get_format_string()
+


The problem is that the bzrdir format strings mean a lot more than just
a repository format. (See the recent confusion that upgrading a branch
to 1.6 caused it to seem to upgrade to 1.9, etc.)

I would be happier if we used the specific repository format strings for
this, rather than the all-in-one short bzrdir name. (Of course, in that
case you don't need a new object, you can just use
format.get_format_string()).

So as yet, I'm not convinced this is needed, as I don't think it is
better than format.get_format_string(). Is there a reason you think it
is better?

John
=:->

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

iEYEARECAAYFAkmdbGkACgkQJdeBCYSNAANxaQCgvMzsKCAkA5PyYfNnseGcTAHd
N4oAn3XeVbabWeN1x7ZAVLahYcpzBmNt
=RXd4
-----END PGP SIGNATURE-----



More information about the bazaar mailing list