head 1.1; access; symbols; locks mah:1.1; strict; comment @# @; expand @b@; 1.1 date 2004.07.15.11.45.10; author MarkHillebrand; state Exp; branches; next ; desc @none @ 1.1 log @Initial Version @ text @#!/usr/bin/perl -i.bak -p # (C) 2004, Mark A. Hillebrand # Purpose: does something similar to cvs2cl --accum # Usage: Provide the ChangeLog name as first (single) argument # First time usage: create initial ChangeLog via `svn log > ChangeLog' if( $.==1 ) { $first=$_; # save first line (of hyphens) for possible later use $_=''; # dont print } elsif( $.==2 ) { m/^r(\d+)/ or die "something bad happened"; # TODO implement graceful error handling # put $first line back in, if there was no new revision, otherwise, # the a line of hyphens comes from the log command print `svn log -r HEAD:@@{[$1+1]} 2>/dev/null` || $first; } @