develooper Front page | perl.perl5.porters | Postings from April 2007

Re: [HOWTO] manage blead patches with git+rsync

Thread Previous | Thread Next
Brandon Black
April 9, 2007 05:25
Re: [HOWTO] manage blead patches with git+rsync
Message ID:
On a related note, here's how I keep track of perl-current with SVK,
which is more like the "having a second git repository" method above
(note my homedir in the examples, change that to whatever you like):

1) Make a perl-current directory in your local depot somewhere:

svk mkdir //local/perl5-current

2) Check it out

cd ~blblack/repos
svk checkout //local/perl5-current

3) Run a script like p5sync (at the bottom of this email), which
rsyncs into this checkout and commits the changes

4) For each local patch you're maintaining, make a branch:

svk cp //local/perl5-current //local/perl5-mypatch

5) Check that out too

cd ~blblack/repos
svk checkout //local/perl5-mypatch

To make changes to your patch, edit in ~blblack/repos/perl5-mypatch
and commit as normal.
To grab the latest perl-current changes and merge them into yout
mypatch branch, re-run the p5sync script on your perl-current
directory, and then:

cd ~blblack/repos/perl5-mypatch
svk update -m

This re-integrates your patch branch with the latest changes in perl-current.

To get a diff for submission to the mailinglist:

svk diff //local/perl5-current //local/perl5-mypatch

---------------------- ------------------------
#!/usr/bin/perl -w

use strict;
use warnings;

chdir('~blblack/repos/perl-current') or die "no checkout directory: $!";
system('rsync -avz --delete rsync:// .');

open(my $status_fh, 'svk status|');
while(<$status_fh>) {
    /^([?!])\s+(.*)\n$/ || next;
    system("svk add $2") if $1 eq '?';
    system("svk rm $2") if $1 eq '!';

system("svk commit -m 'fresh rsync'");

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About