Subject: | New options --savedata and --verbatim |
I'd like to ask if you include to your package my modification which
provide new features:
--savedate : stores original timestamps in destination repository
--verbatim : do not include uuid and original timestamp in log
message
I found it very useful as far as it can make a real copy of original
repository.
Subject: | SVN-Pusher-0.04.diff |
diff -Nru SVN-Pusher-0.03001/bin/svn-pusher SVN-Pusher-0.04/bin/svn-pusher
--- SVN-Pusher-0.03001/bin/svn-pusher 2006-01-12 20:09:57.000000000 +0100
+++ SVN-Pusher-0.04/bin/svn-pusher 2007-10-04 15:16:20.000000000 +0200
@@ -44,6 +44,15 @@
Revision can also be C<HEAD> which means the newest revision in
the repository.
+=item -d --savedate
+
+Save svn:date property. It requires an pre-revprop-change to be exist on
+destination repository.
+
+=item -b --verbatim
+
+Do not store uuid and timestamp in log message.
+
=back
Example:
@@ -64,12 +73,12 @@
# --------------------------------------------------------------------------
-sub opt_push { return ('message|m:s', 'revision|r:s') }
+sub opt_push { return ('message|m:s', 'revision|r:s', 'savedate|d', 'verbatim|b') }
sub do_push
{
- die "$0 push [--message=<text>] [--revision=<from>:<to>] <source> <target>\n" unless $#_ >= 2;
+ die "$0 push [--message=<text>] [--revision=<from>:<to>] [--savedate] [--verbatim] <source> <target>\n" unless $#_ >= 2;
my ($options, $source, $target) = @_;
my %revs ;
@@ -84,10 +93,12 @@
}
my $m = SVN::Pusher::CmdLine->new(
- target => $target,
- source => $source,
+ target => $target,
+ source => $source,
%revs,
- logmsg => $options -> {message}
+ logmsg => $options -> {message},
+ savedate => $options -> {savedate},
+ verbatim => $options -> {verbatim},
);
if ($m->init () > 0)
diff -Nru SVN-Pusher-0.03001/CHANGES SVN-Pusher-0.04/CHANGES
--- SVN-Pusher-0.03001/CHANGES 2006-06-08 21:59:24.000000000 +0200
+++ SVN-Pusher-0.04/CHANGES 2007-10-04 14:49:34.000000000 +0200
@@ -1,5 +1,8 @@
SVN::Pusher changelog:
+* 0.04
+ - Added --save-svn-date option.
+ - Does not include original uuid in log message.
* 0.03001
- Fixed a printing of an object variable that was eliminated, that
caused a warning under "use warnings;".
diff -Nru SVN-Pusher-0.03001/lib/SVN/Pusher.pm SVN-Pusher-0.04/lib/SVN/Pusher.pm
--- SVN-Pusher-0.03001/lib/SVN/Pusher.pm 2006-06-08 21:49:06.000000000 +0200
+++ SVN-Pusher-0.04/lib/SVN/Pusher.pm 2007-10-04 15:13:58.000000000 +0200
@@ -140,7 +140,7 @@
package SVN::Pusher ;
-our $VERSION = '0.03001';
+our $VERSION = '0.04';
use SVN::Core;
use SVN::Repos;
use SVN::Fs;
@@ -196,6 +196,8 @@
my ($self, $date, $sourcerev, $rev, undef, undef, $pool) = @_;
my $cpool = SVN::Pool->new_default ($pool);
+ $self->{target_update_ra}->change_rev_prop($rev, 'svn:date', $date)
+ if $self->{savedate};
#$self->{rarepos}->change_rev_prop($rev, 'svn:date', $date);
#$self->{rarepos}->change_rev_prop($rev, "svm:target_headrev$self->{source}",
# "$sourcerev",);
@@ -228,7 +230,7 @@
my $editor = SVN::Pusher::MirrorEditor->new
($tra->get_commit_editor(
- ($msg?"$msg\n":'') . ":$rev:$self->{source_uuid}:$date:",
+ $self->{verbatim} ? $msg : (($msg?"$msg\n":'') . ":$rev:$self->{source_uuid}:$date:"),
sub { $self->committed($date, $rev, @_) },
undef, 0));