New Emacs Bazaar Repository II
Jason Earl
jearl at notengoamigos.org
Wed Feb 25 02:57:49 GMT 2009
John Arbash Meinel <john at arbash-meinel.com> writes:
> ...
>
>> Secondly, I am somewhat confused about why 0.92 pack branches are the
>> default branch type in a 1.9 format repository. Everything worked the
>> same, but you would get warnings when stacking on the branches. To my
>> limited experience that seems like a very odd default. When pulling
>> branches into a 1.9 formatted repository it seems like you should get
>> 1.9 format branches.
>>
>
> This was brought up recently. And it falls back to "repositories are a
> storage optimization" which isn't a great answer, but is why it is
> that way.
Sometimes there are no good answers.
> We don't have a default branch format for a given repository
> format. We just have a "default branch format" and a "default
> repository format". Doing "bzr init-repo --XXX" sets the format of
> the repo, but that has no effect on the branches inside.
Perhaps you need a flag in the spirit of GNUs old --posix-me-harder?
> While it arguably *could*, there are other concerns like "bzr branch"
> into that repo. Should it be upgrading the branch format
> automatically? Doesn't that break "don't upgrade unless explicitly
> requested so as to maintain inter-version compatibility" ?
It's your software.
I found it a bit surprising that it didn't do the conversion
automatically. I found it more surprising when I could still stack
branches on branches that were apparently in the wrong format. To be
honest, I figured that it was a bug in the bzr.dev version of bzr that I
was running.
So I suppose I am a bit more surprised to hear you say that this
behavior is apparently by design.
I just took a look at the Coverter6to7 class in branch.py, and it seems
like a pretty straightforward conversion. Honestly, I am a little
perplexed why the end user should even have to worry about this stuff.
If you don't automatically convert (in this case) you get a bunch of
completely useless warnings (that don't stop the software from working
correctly), and a confused bzr info (format unnamed). If you do the
conversion, everything just works and no one has to even worry about
formats.
> Personally, I agree that "bzr init" (no options) inside a repository
> should probably use a repository-default branch format. I'm on the
> fence for 'bzr branch'. You are upgrading the internal repository
> storage, so pushing to a new location will use the new format,
> however, pushing a new branch into an existing repository would only
> upgrade the Branch format. So there is still use in not
> auto-upgrading.
And there is the piece I was missing. I had been pushing and pulling
between repositories trying to find something that didn't do the right
thing, and everything worked. But that was simply because I am using a
new enough version of bzr that I can deal with Branch Format 7 branches.
I should have known there would be a good reason. It would be very
annoying to have a public repository that had branches that got created
in a new format simply because one of the developers got a new version
of bzr.
Sorry for the noise.
Jason
More information about the bazaar
mailing list