re-create branch from rich-root-pack repo to pack-0.92 repo

Ben Finney ben at benfinney.id.au
Thu Mar 5 04:38:44 GMT 2009


Howdy all,

I have a branch in one repository, and I want to re-create it in
another repository.

    $ bzr info repo-spam/
    Shared repository with trees (format: rich-root-pack)
    Location:
      shared repository: /home/bignose/repo-spam

    $ bzr info repo-spam/branch-foo/
    Repository checkout (format: rich-root-pack)
    Location:
      repository checkout root: /home/bignose/repo-spam/branch-foo
            checkout of branch: bzr+ssh://bzr.example.org/bzr/branch-foo/
             shared repository: /home/bignose/repo-spam

    $ bzr info repo-eggs/
    Shared repository with trees (format: pack-0.92)
    Location:
      shared repository: /home/bignose/repo-eggs


What I want is for ‘repo-eggs’ to contain a branch, ‘branch-foo’, that
re-creates the history of the ‘branch-foo’ branch. I'm happy for the
two to *not* have any common ancestry, if that turns out to be
necessary.

What I *don't* want is to change the format of ‘repo-eggs’, since
other people are using it and I don't want to propagate a change of
repository format to them.


I tried ‘bzr branch’, but of course that gives:

    $ bzr branch repo-spam/branch-foo/ repo-eggs/branch-foo/
    Repository KnitPackRepository('file:///home/bignose/repo-eggs/.bzr/repository/') is not compatible with repository KnitPackRepository('file:///home/bignose/repo-spam/.bzr/repository/')

which, while a completely contradictory message (the very same format
is named twice, but it's not compatible?), is at least familiar from
hard experience: the revision data can't come across cleanly because
the repository formats are incompatible.

Likewise, for the same reason, I can't pull in the revision data:

    $ bzr init repo-eggs/branch-foo/
    $ cd repo-eggs/branch-foo/
    $ bzr pull ../../repo-spam/branch-foo/
    Repository KnitPackRepository('file:///home/bignose/repo-eggs/.bzr/repository/') is not compatible with repository KnitPackRepository('file:///home/bignose/repo-spam/.bzr/repository/')


But, I thought, I should be able to use ‘replay’, since all I want is
the *effects* of the commits, not the identical revision data. No joy:

    $ bzr replay --revision 0.. ../../repo-spam/branch-foo/
    Repository KnitPackRepository('file:///home/bignose/repo-eggs/.bzr/repository/') is not compatible with repository KnitPackRepository('file:///home/bignose/repo-spam/.bzr/repository/')

Which stumps me. Shouldn't ‘replay’ do what I'm expecting?

How can I achieve the goal specified above?

-- 
 \       “From the moment I picked your book up until I laid it down I |
  `\        was convulsed with laughter. Someday I intend reading it.” |
_o__)                                                    —Groucho Marx |
Ben Finney




More information about the bazaar mailing list