So many repo formats

Andrew Bennetts andrew.bennetts at canonical.com
Tue Nov 18 03:02:21 GMT 2008


Stefan Monnier wrote:
> >> >> So, what's the downside?
> >> > Upgrading from a non-rich-root format to a rich-root format is more
> >> > resource-intensive and one-way (you can't convert from a
> >> > rich-root-format to a non-rich-root-format, since that would lose data).
> >> I don't understand why its one way: losing data is usually the easier path.
> > Because then you'd have two revisions claiming to have the same revision
> > ID, but with different data.  That's a fairly fundamental constraint
> > that we cannot break.  So it's not possible to store rich-root revisions
> > in a non-rich-root repository
> 
> Doesn't the same problem appear if you start with a non-rich-root
> repository and upgrade it to rich-root?
> It seems the problem is no so much going from RR to NRR, but rather the
> loop from RR to RR via NRR.  Neither NRR->RR nor RR->NRR is a problem in
> itself, it's only if you combine them that you can get into trouble.

A revision created in a NRR repository can be represented accurately in a RR
repository.  So that same revision, stored in a RR repository, can be
fetched back to a NRR repository.  It's only revisions created in a RR
repository, i.e. a revision with the rich-root data stored in it, that
cannot be transported to a NRR repository.

> So rather than disallow RR->NRR, you may decide to disallow NRR->RR.
> Or find some way to allow both and yet prevent the roundtrip.

We already allow both, so long as the revision supports it.  If it's a NRR
revision, it can be copied NRR->RR and RR->NRR.  If it's a RR revision, then
bzr will give an error if you try to copy it from a RR repo to NRR.

The problem is that people tend add new revisions ;)

> In any case, the current situation is undesirable, and it seems that
> sooner or later we'll want to use a rich-root format as default, and
> I think the sooner the better.

I agree, and so do most people I think.  See the recent discussion linked
earlier in the thread:

<http://thread.gmane.org/gmane.comp.version-control.bazaar-ng.general/48697/focus=48698>

In particular see this message from Martin:

<http://article.gmane.org/gmane.comp.version-control.bazaar-ng.general/48825>

In that he says:

] The next time we add a format, we should make the _primary_ format
] rich-root.

-Andrew




More information about the bazaar mailing list