pull/init from bzr merge directive

Brian de Alwis briandealwis at gmail.com
Wed Oct 31 11:06:34 UTC 2012


Bastian,

Look again — that recipe stores all the revisions in that single file.
 It does exactly what you're looking for!

The file produced by "bzr send" is called a merge directive. The term
"bundle" refers to some kind of metadata within the merge directive.

The first "bzr init" is to create an empty branch as the comparator —
"bzr send" uses that branch to determine which revisions should be
considered as already known / available to the receiver. By using an
empty branch, we ensure that "bzr send" includes all the revisions of
the branch.

Brian.

On 2012-10-31, at 6:51 AM, Bastian B <bastian.dev at gmail.com> wrote:

> Hi Brian,
>
> I don't want to create a merge directive. I want to store a whole
> repository (or at least a whole branch) with all its revisions in a
> single file. I also want to be able to restore the complete repo (or
> at least the branch) from that file.
>
> I thought I could use a merge directive with all revisions (-r 0..)
> but that doesn't seem to work.
>
> Any other ideas?
>
> Bastian
>
> On Tue, Oct 30, 2012 at 8:13 PM, Brian de Alwis <briandealwis at gmail.com> wrote:
>> To create the merge directive:
>>
>> # bzr send requires a submit branch to provide info on what is known on the other side
>> # i.e., to decide what commits need to be in the merge directive.  We want everything,
>> # so we specify an empty branch.  Is there no location-alias for an empty branch?
>> $ bzr init /tmp/empty
>> $ bzr send --no-patch -o /tmp/backup.bundle /tmp/empty
>>
>> To restore the merge directive:
>> $ cd new/root
>> $ bzr init
>> $ bzr pull /tmp/backup.bundle
>>
>> Brian.



More information about the bazaar mailing list