[MERGE] RepositoryFormat.network_name.
Robert Collins
robert.collins at canonical.com
Thu Feb 19 22:07:50 GMT 2009
On Thu, 2009-02-19 at 08:27 -0600, John Arbash Meinel wrote:
> -----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?
Yes, it works :).
I think we need to improve the docs or something then.
- For metadir repositories we use the formats get_format_string.
- for all-in-one formats we use the control dirs get_format_string.
- for git/svn/hg/ the plugin defines it.
The text you quoted is from an all-in-one class, there is
*no* .bzr/repository in those formats, just a ./branch-format
and .bzr/revisions/ .bzr/weaves/ etc.
-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090220/278b27f3/attachment-0001.pgp
More information about the bazaar
mailing list