#! /usr/bin/perl -w

##  $Id: mkchangelog 7473 2005-12-24 21:29:22Z eagle $
##
##  Generate a ChangeLog from svn log using svn2cl.
##
##  This script prompts the user for a date from which to pull log entries
##  and the prefix to strip from file names and generates a ChangeLog file
##  by running svn2cl.

$| = 1;

print "Enter prefix to strip from file names: ";
my $prefix = <STDIN>;
chomp $prefix;

print "Enter date to start log at (YYYY-MM-DD): ";
my $date = <STDIN>;
chomp $date;

print "\nRunning svn2cl....\n";
system ("svn2cl --strip-prefix=$prefix --group-by-day -r 'HEAD:{$date}'") == 0
    or die "svn2cl exited with status " . ($? >> 8) . "\n";
