Subject: | Please, be less verbose as default |
The SVN::Pusher is really great tool but I don't like its verbose
messages. It is really hard to read the log message. Revision numbers
of current operation just disappears quickly from terminal.
I think the verbose messages should be not enabled by default (i.e.
see svn log --verbose)
Also I'd like to see a single space (perhaps 4 space characters as
like "svk log -v") before character reporting the action taken.
BTW, this output is very similar to svn log rather than to svn up, so
I think the status "U" should be replaced with status "M" but it is
not so important.
Thank you.
Subject: | SVN-Pusher-0.05.diff |
diff -ru SVN-Pusher-0.04-R2czaL/bin/svn-pusher SVN-Pusher-0.05/bin/svn-pusher
--- SVN-Pusher-0.04-R2czaL/bin/svn-pusher 2007-10-06 18:07:10.000000000 +0200
+++ SVN-Pusher-0.05/bin/svn-pusher 2007-10-08 13:58:45.000000000 +0200
@@ -53,6 +53,10 @@
Do not store uuid and timestamp in log message.
+=item -v --verbose
+
+Print extra information.
+
=back
Example:
@@ -73,12 +77,12 @@
# --------------------------------------------------------------------------
-sub opt_push { return ('message|m:s', 'revision|r:s', 'savedate', 'verbatim') }
+sub opt_push { return ('message|m:s', 'revision|r:s', 'savedate', 'verbatim', 'verbose|v') }
sub do_push
{
- die "$0 push [--message=<text>] [--revision=<from>:<to>] [--savedate] [--verbatim] <source> <target>\n" unless $#_ >= 2;
+ die "$0 push [--message=<text>] [--revision=<from>:<to>] [--savedate] [--verbatim] [--verbose] <source> <target>\n" unless $#_ >= 2;
my ($options, $source, $target) = @_;
my %revs ;
@@ -99,6 +103,7 @@
logmsg => $options -> {message},
savedate => $options -> {savedate},
verbatim => $options -> {verbatim},
+ verbose => $options -> {verbose},
);
if ($m->init () > 0)
Tylko w SVN-Pusher-0.05: blib
diff -ru SVN-Pusher-0.04-R2czaL/CHANGES SVN-Pusher-0.05/CHANGES
--- SVN-Pusher-0.04-R2czaL/CHANGES 2007-10-06 18:26:33.000000000 +0200
+++ SVN-Pusher-0.05/CHANGES 2007-10-08 13:54:47.000000000 +0200
@@ -1,5 +1,8 @@
SVN::Pusher changelog:
+* 0.05
+ - Added the --verbose flag. The default mode is more quiet.
+
* 0.04 Sat Oct 6 18:26:23 IST 2007
- Added the --savedate flag. (thanks to DEXTER)
- Added the --verbatim flag. (thanks to DEXTER)
diff -ru SVN-Pusher-0.04-R2czaL/lib/SVN/Pusher/CmdLine.pm SVN-Pusher-0.05/lib/SVN/Pusher/CmdLine.pm
--- SVN-Pusher-0.04-R2czaL/lib/SVN/Pusher/CmdLine.pm 2007-10-06 17:35:56.000000000 +0200
+++ SVN-Pusher-0.05/lib/SVN/Pusher/CmdLine.pm 2007-10-08 14:10:34.000000000 +0200
@@ -11,7 +11,7 @@
if ($op eq "file")
{
- print sprintf("%-3c%s\n", ord($spec->{'file_op'}), $spec->{'path'});
+ print sprintf(" %c %s\n", ord($spec->{'file_op'}), $spec->{'path'});
}
elsif ($op eq "msg")
{
diff -ru SVN-Pusher-0.04-R2czaL/lib/SVN/Pusher.pm SVN-Pusher-0.05/lib/SVN/Pusher.pm
--- SVN-Pusher-0.04-R2czaL/lib/SVN/Pusher.pm 2007-10-06 18:19:49.000000000 +0200
+++ SVN-Pusher-0.05/lib/SVN/Pusher.pm 2007-10-08 13:56:07.000000000 +0200
@@ -30,14 +30,14 @@
sub open_directory {
my ($self,$path,$pb,undef,$pool) = @_;
- $self->obj->report({'op' => "file", 'file_op' => "U", 'path' => $path});
+ $self->obj->report({'op' => "file", 'file_op' => "M", 'path' => $path}) if $self->obj->{verbose};
return $self->SUPER::open_directory ($path, $pb,
$self->{mirror}{target_headrev}, $pool);
}
sub open_file {
my ($self,$path,$pb,undef,$pool) = @_;
- $self->obj->report({'op' => "file", 'file_op' => "U", 'path' => $path});
+ $self->obj->report({'op' => "file", 'file_op' => "M", 'path' => $path}) if $self->obj->{verbose};
$self->{opening} = $path;
return $self->SUPER::open_file ($path, $pb,
$self->{mirror}{target_headrev}, $pool);
@@ -65,7 +65,7 @@
my $path = shift;
my $pb = shift;
my ($cp_path,$cp_rev,$pool) = @_;
- $self->obj->report({'op' => "file", 'file_op' => "A", 'path' => $path});
+ $self->obj->report({'op' => "file", 'file_op' => "A", 'path' => $path}) if $self->obj->{verbose};
$self->SUPER::add_directory($path, $pb, @_);
}
@@ -95,13 +95,13 @@
my $self = shift;
my $path = shift;
my $pb = shift;
- $self->obj->report({'op' => "file", 'file_op' => "A", 'path' => $path});
+ $self->obj->report({'op' => "file", 'file_op' => "A", 'path' => $path}) if $self->obj->{verbose};
$self->SUPER::add_file($path, $pb, @_);
}
sub delete_entry {
my ($self, $path, $rev, $pb, $pool) = @_;
- $self->obj->report({'op' => "file", 'file_op' => "D", 'path' => $path});
+ $self->obj->report({'op' => "file", 'file_op' => "D", 'path' => $path}) if $self->obj->{verbose};
$self->SUPER::delete_entry ($path, $rev, $pb, $pool);
}
@@ -140,7 +140,7 @@
package SVN::Pusher ;
-our $VERSION = '0.04';
+our $VERSION = '0.05';
use SVN::Core;
use SVN::Repos;
use SVN::Fs;