netdev
[Top] [All Lists]

Re: [BK] XFRM Clean-Up xfrm_lookup()

To: yoshfuji@xxxxxxxxxxxxxx
Subject: Re: [BK] XFRM Clean-Up xfrm_lookup()
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Sun, 21 Mar 2004 23:05:13 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040320.135151.114415274.yoshfuji@xxxxxxxxxxxxxx>
References: <20040320.135151.114415274.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, 20 Mar 2004 13:51:51 +0900 (JST)
YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx> wrote:

> Please pull the following changesets from <http://bk.skbuff.net:10772>.

Pulled, thanks Yoshfuji.

> (Sorry I don't know how to send changesets in e-mail.)

I attach a perl script that I use.  It works for me.
It would be really nice to see the actual diffs here and
not just change comments :)

Just do this:

bash$ bk changes -L -f >changes.out
bash$ ./csets-to-marcelo.pl <changes.out >foo.txt

Maybe you like the output, maybe you don't :)  You can edit it
to your tastes.

#!/usr/bin/perl -w

use strict;

my ($lhs, $rev, $tmp, $rhs, $s);
my @cset_text = ();
my @pipe_text = ();
my $have_cset = 0;

while (<>) {
        next if /^---/;

        if (($lhs, $tmp, $rhs) = (/^(ChangeSet\@)([^,]+)(, .*)$/)) {
                &cset_rev if ($have_cset);

                $rev = $tmp;
                $have_cset = 1;

                push(@cset_text, $_);
        }

        elsif ($have_cset) {
                push(@cset_text, $_);
        }
}
&cset_rev if ($have_cset);
exit(0);


sub cset_rev {
        my $empty_cset = 0;

        open PIPE, "bk export -tpatch -hdu -r $rev 2>/dev/null |" or die;
        while ($s = <PIPE>) {
                push(@pipe_text, $s);
        }
        close(PIPE);

        if (! $empty_cset) {
                print @cset_text;
                print @pipe_text;
                print "\n\n";
        }

        @pipe_text = ();
        @cset_text = ();
}



<Prev in Thread] Current Thread [Next in Thread>