>>>>> "stefan" == Stefan Reichör <[EMAIL PROTECTED]> writes:

    stefan> Hi Vincent!
    >> Hi all,
    >> 
    >> While searching for a way to create a new branch from a bzr
    >> bundle, I came across bzr-gnus-apply-patch and
    >> bzr-apply-patch-mapping which sounded promising.
    >> 
    >> Unfortunately the former doesn't seem to be implemented and the
    >> later is not referenced anywhere.
    >> 
    >> Are they plans to implement it ?

    stefan> bzr-gnus.el holds the available functionaltiy to handle bzr patches.

    stefan> bzr-gnus-merge-bundle allows to merge an attached bzr
    stefan> bundle to an existing branch.

Ok.

    stefan> What do you want to achieve?

Create a new branch based on the same revision that the bundle,
then apply the bundle.

Because, 99% of the time, when I look at a bundle I don't have a
monkey branch waiting for the bundle.

Moreover, as far as possible I want to be in the same state than
the sender so merging is not desired.

Said otherwise, I want a branch where:

   bzr send

will produce the bundle.

    stefan> Can you tell me a sequence of bzr shell commands that
    stefan> should be implemented?

#!/bin/sh -x
BASE=~/src/bzr/reviews
NICK=$1
PATCH=$BASE/$NICK.patch
# Bundles contain a line like:
# base_revision_id: [EMAIL PROTECTED]
REV_ID=`grep '^# base_revision_id: ' $PATCH | sed -e 's/^# base_revision_id: 
//'`
TARGET_BRANCH=`grep '^# target_branch: ' $PATCH | sed -e 's/^# target_branch: 
//'`
cd $BASE
bzr branch $TARGET_BRANCH -r revid:$REV_ID $1
cd $BASE/$1
bzr pull $PATCH

$1 is the argument to the script, has been used to save the
bundle in a file named $1.patch and is used as the name of the
newly created branch.

I'm not proposing *that* ui, it's just the ad-hoc script I use
(also because the patches are sometimes available from a web
site, must of the time I got them in gnus).

IF you want to be really robust then the grep above should check
that the first line is:
# Bazaar merge directive format 2 (Bazaar 0.90)

But this is not going to change for the foreseeable future.

    stefan> I am willing to implement your desired functionality
    stefan> if you provide the necessary details.

Thanks in advance 8-)

       Vincent

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to