Index: ossp-pkg/shiela/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/shiela/ChangeLog,v rcsdiff -q -kk '-r1.28' '-r1.29' -u '/v/ossp/cvs/ossp-pkg/shiela/ChangeLog,v' 2>/dev/null --- ChangeLog 2002/12/23 11:32:05 1.28 +++ ChangeLog 2002/12/23 11:50:09 1.29 @@ -11,6 +11,11 @@ Changes between 1.0.2 and 1.0.3 (23-Dec-2002 to xx-Dec-2002): + *) Make sure that the header in reports is not optically destroyed by + too long columns (as it is the case all the time for PMOD commits + in the OpenPKG project). + [Ralf S. Engelschall] + *) Correctly recognize and configure RSE CVS version in shiela-install program. [Ralf S. Engelschall] Index: ossp-pkg/shiela/shiela.pl RCS File: /v/ossp/cvs/ossp-pkg/shiela/shiela.pl,v rcsdiff -q -kk '-r1.42' '-r1.43' -u '/v/ossp/cvs/ossp-pkg/shiela/shiela.pl,v' 2>/dev/null --- shiela.pl 2002/12/23 11:32:05 1.42 +++ shiela.pl 2002/12/23 11:50:09 1.43 @@ -1014,6 +1014,23 @@ ## _________________________________________________________________ ## +## Fit text into particular columns. +## +## This makes sure a text fits into a particular columns by +## truncating (and extending with "$") if necessary. +## _________________________________________________________________ +## + +sub fit_columns { + my ($col, $txt) = @_; + if (length($txt) > $col) { + $txt = substr($txt, 0, $col-1) . '$'; + } + return $txt; +} + +## _________________________________________________________________ +## ## TAGINFO HOOK ## ## We hook into CVS via `taginfo' to check whether user is allowed to @@ -2074,8 +2091,8 @@ $cvsbranches{$e->{branch}} = 0 if (not defined($cvsbranches{$e->{branch}})); $cvsbranches{$e->{branch}}++; } - $IN->{cvsbranch} = join(', ', keys(%cvsbranches)); - $IN->{cvsmodule} = join(', ', keys(%cvsmodules)); + $IN->{cvsbranch} = join(' ', keys(%cvsbranches)); + $IN->{cvsmodule} = join(' ', keys(%cvsmodules)); # # Finally generate the logging message. @@ -2104,13 +2121,20 @@ my @moy = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time()); - my $date = sprintf("%02d-%s-%04d %02d:%02d:%02d", - $mday, $moy[$mon], 1900+$year, $hour, $min, $sec); + my $txt_date = sprintf("%02d-%s-%04d %02d:%02d:%02d", + $mday, $moy[$mon], 1900+$year, $hour, $min, $sec); + my $txt_server = &fit_columns(32, $CF->{Repository}->{Host}); + my $txt_root = &fit_columns(32, $CF->{Repository}->{Path}); + my $txt_module = &fit_columns(32, $IN->{cvsmodule}); + my $txt_branch = &fit_columns(32, $IN->{cvsbranch}); + my $txt_name = &fit_columns(32, $RT->{username}); + my $txt_email = &fit_columns(32, $RT->{usermail}); + my $txt_handle = &fit_columns(32, $IN->{handle}); $O .= "\n" . - $prefix . sprintf("%-40s %s\n", "Server: ".$CF->{Repository}->{Host}, "Name: ".$RT->{username}) . - $prefix . sprintf("%-40s %s\n", "Root: ".$CF->{Repository}->{Path}, "Email: ".$RT->{usermail}) . - $prefix . sprintf("%-40s %s\n", "Module: ".$IN->{cvsmodule}, "Date: ".$date) . - $prefix . sprintf("%-40s %s\n", "Branch: ".$IN->{cvsbranch}, "Handle: ".$IN->{handle}); + $prefix . sprintf("%-40s %s\n", "Server: ".$txt_server, "Name: ".$txt_name) . + $prefix . sprintf("%-40s %s\n", "Root: ".$txt_root, "Email: ".$txt_email) . + $prefix . sprintf("%-40s %s\n", "Module: ".$txt_module, "Date: ".$txt_date) . + $prefix . sprintf("%-40s %s\n", "Branch: ".$txt_branch, "Handle: ".$txt_handle); } # the file list