Comment 13 for bug 672389

Revision history for this message
Eric S. Raymond (esr-thyrsus) wrote : Re: [Bug 672389] Re: bzr fast-import crashes on a dump produced by bzr fast-export

Jelmer Vernooij <email address hidden>:
> All branches in bzr have an explicit path in the file system, the
> repository is merely the place where the revisions happen to be stored,
> unlike e.g. git where it also acts as more of a mechanism to group
> related branches.

OK, I went and read a bzr tutorial. If I believe the docs, bzr's model
seems rather like CVS modules; in terms of J. Random Vanilla VCS, a
bzr repo is like a collection of named repositories with nothing
necessarily in common except the fact that they all happen to live in
the same storage unit. (If I have this theory wrong, please correct me.)

The trouble with this theoretical account is that it doesn't connect
with what I see on my disk. When I create a bzr repo 'bzr-testrepo',
add files there, and do checkins, I don't see any path structure that
corresponds to "branches". Instead I see a single directory with a
.bzr subdirectory in it. My commits have a "branch nick" property
that shows up in the log, but it seems to be identical to the
directory basename and thus doesn't convey any actual information.

If I say "bzr-fast-export bzr-testrepo' I get what looks like an ordinary
fast-import dump of the repo context. If I say "bzr-fast-export --no-plain
bzr-testrepo' I get a fast-import dump with perfectly reasonable-looking
property settings for branch-nick in it.

So at what point does this mythical "branch" structure" assume any reality
at all? So far, this looks like a git or hg repo in which the default
branch happens to have the name of the directory basename. Is there
any good reason the whole repo coudn't be exported as a collection
of git branches, each corresponding to a bzr branch?

> > What's its syntax? Is it documented somewhere? I need to know enough to
> > parse it.
> I'm not sure if it's documented anywhere. I suspect it is, but that I
> simply just don't know where.

This, too, is a documentation bug.

> As far as I can tell from the
> python-fastimport sourcecode the format is something like this:
>
> "property" <space> NAME <space> VALUE-LENGTH <space> VALUE
>
> or, if the value is empty:
>
> "property" <space> NAME
>
> NAME and VALUE are utf8-encoded.
>
> The properties for each commit are sorted by the property name.

Yup, I have to parse that. The property values could contain newlines.

Is this feature scheduled for inclusion in core git?

Where can I find documentation on the bzr "fixes bug foo" extension
mentioned on the web page? Is it just a property with the name
"fixes-bug"?
--
  <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>