Commits

Shlomi Fish  committed cc224d0

changes and style-trailing-space

  • Participants
  • Parent commits dba2bce

Comments (0)

Files changed (8)

File module/Changes

 SVN::Pusher changelog:
 
-* 0.07
+0.07        2014-01-31
     - Add strict and warnings to all modules.
-    - Add LICENSE .
+    - Add the LICENSE file.
+    - Add t/cpan-changes.t and t/style-trailing-space.t .
 
-* 0.06         Mon Oct 22 11:05:58 IST 2007
+0.06        2007-10-22
     - Added the --version/version flag to svn-pusher to display the
     version number
     - Added more POD to SVN::Pusher with links to various resources including
     the Subversion repository.
 
-* 0.05         Fri Oct 12 14:24:46 IST 2007
+0.05        2007-10-12
     - Added the --verbose flag to be less verbose by default (thanks to
     DEXTER). Resolving:
         - http://rt.cpan.org/Public/Bug/Display.html?id=29838
     option is broken for svn:// repos. This was due to a possible undefined
     value that was not handled correctly. (thanks to DEXTER).
 
-* 0.04         Sat Oct  6 18:26:23 IST 2007
+0.04      2007-10-06
     - Added the --savedate flag. (thanks to DEXTER)
     - Added the --verbatim flag. (thanks to DEXTER)
     - Removed '\t''s from lib/SVN/Pusher.pm and replaced them with
     space. (SHLOMIF)
 
-* 0.03001
+0.03001 2006-06-08
     - Fixed a printing of an object variable that was eliminated, that
     caused a warning under "use warnings;".
     - Added use warnings and use strict to the top of the code.
     - Added a rudimentary 00-load.t test file.
 
-* 0.03
+0.03    2006-01-12
     - Removed an svn-pusher remnant that caused problems when specifying paths
     in the middle of the repositories (instead of the repos root). Now
     one cannot specify the startrev as HEAD (whatever that means).
 
-* 0.02
+0.02    2006-01-04
     - Fixed a POD problem pointed to by rajeev@tigr.org
     - Made the program throw an exception if the revision field is
       incorrect.
     - Fixes http://rt.cpan.org/NoAuth/Bug.html?id=16779
 
-* 0.01
+0.01    2005-08-02
     - Placed Pusher.pm in lib/SVN/Pusher.pm
     - Removed the redundant stuff from lib/SVN/Pusher.pm which remained
     there from SVN::Push.
     - Removed the create option in init()/cmdline/etc.
     - Adapted the documentation to the new version.
 
-* 0.00_03 - forked from SVN-Push, converted the functionality to work with
-a modern SVN, and with what we wanted to do (just changeset propagation -
-nothing more, nothing less).
-
-SVN::Push changelog:
---------------------
-
-- 0.02
-
-  * fixed problem with startrev argument. Now HEAD means the
-    HEAD of the given directory, not of the repository at all.
-
-- 0.01 Initial release
+0.00_03     2005-08-02
+    - forked from SVN-Push, converted the functionality to work
+    with a modern SVN, and with what we wanted to do (just changeset
+    propagation - nothing more, nothing less).

File module/Changes.SVN-Push.txt

+SVN::Push changelog:
+--------------------
+
+- 0.02
+
+  * fixed problem with startrev argument. Now HEAD means the
+    HEAD of the given directory, not of the repository at all.
+
+- 0.01 Initial release

File module/MANIFEST

 Build.PL
 Changes
+Changes.SVN-Push.txt
 LICENSE
 MANIFEST
 META.json
 lib/SVN/Pusher.pm
 lib/SVN/Pusher/CmdLine.pm
 t/00-load.t
+t/cpan-changes.t
+t/style-trailing-space.t

File module/README

-This is the README file for SVN::Push, a subversion repository 
+This is the README file for SVN::Push, a subversion repository
 distribution tool.
 
 Subversion is a version control system, you can find more information
 at http://subversion.tigris.org/.
 
 svn-pusher is a command line utility that allows one to propagate ("push")
-changesets between two repositories. SVN::Pusher is the back-end, and 
+changesets between two repositories. SVN::Pusher is the back-end, and
 SVN::Pusher::CmdLine is its derived class, that also reports messages
 to the command line.
 
 
 * Configuration
 
-After install the module, see perldoc bin/svnpush and perldoc Push.pm for more 
+After install the module, see perldoc bin/svnpush and perldoc Push.pm for more
 information.
 
 * AUTHORS

File module/Testing/test.sh

 if test "$SKIP_PUSHER" != "" ; then
     exit
 fi
-svn-pusher push --revision=4:6 file://`pwd`/test-repos-src file://`pwd`/test-repos-dest 
+svn-pusher push --revision=4:6 file://`pwd`/test-repos-src file://`pwd`/test-repos-dest
 # svn-pusher push --revision=4:6 http://localhost:8080/svn-pusher-test/src/trunk svn+ssh://shlomi@localhost`pwd`/test-repos-dest/trunk
-    
+
 # svn checkout file://"$mypath"/

File module/lib/SVN/Pusher.pm

 
 =head1 SYNOPSIS
 
-    my $m = 
+    my $m =
         SVN::Pusher->new(
             source => $sourceurl,
             target => $desturl',
 }
 # ------------------------------------------------------------------------
 
-sub mirror 
+sub mirror
     {
     my ($self, $paths, $rev, $author, $date, $msg, $ppool) = @_;
 
 
 
     $msg = $self -> {logmsg} eq '-'?'':$self -> {logmsg} if ($self -> {logmsg}) ;
-    my $def_msg = 
-        defined($msg) 
+    my $def_msg =
+        defined($msg)
             ?  ( $msg . ($self->{verbatim} ? "" : "\n") )
             : '';
 
 
     $editor->{mirror} = $self;
 
-    
+
     my $sra = $self->{source_update_ra} ||= SVN::Ra->new(url => $self->{source},
               auth   => $self->{auth},
               pool   => $self->{pool},
 
     my $reporter =
         $sra->do_update ($rev+1, '' , 1, $editor);
-    
-    $reporter->set_path ('', $rev, 
-        # $self->{target_source_rev}?0:1, 
+
+    $reporter->set_path ('', $rev,
+        # $self->{target_source_rev}?0:1,
         0,
         undef);
     $reporter->finish_report ();
 
 # ------------------------------------------------------------------------
 
-sub do_init 
+sub do_init
     {
     my $self = shift;
 
     $self->report_msg("Source: $self->{source}");
     $self->report_msg("  Revision: $self->{source_headrev}");
     $self->report_msg("  Root:     $self->{source_root}");
-    $self->report_msg("  Path:     $self->{source_path}"); 
+    $self->report_msg("  Path:     $self->{source_path}");
 
     $self->{target_ra} = SVN::Ra->new(url => $self->{target},
               auth   => $self->{auth},
               pool   => $self->{pool},
               config => $self->{config},
               );
-    
-    
+
+
     $self->{target_headrev} = $self->{target_ra}->get_latest_revnum;
     $self->{target_root}    = $self -> {target_ra} -> get_repos_root ;
-    
+
     $self->{target_path}    = substr ($self -> {target}, length ($self->{target_root})) ||'/' ;
-    
+
     $self->report_msg( "Target: $self->{target}") ;
-    $self->report_msg("  Revision: $self->{target_headrev}") ; 
+    $self->report_msg("  Revision: $self->{target_headrev}") ;
     $self->report_msg("  Root:     $self->{target_root}") ;
-    $self->report_msg("  Path:     $self->{target_path}") ; 
-    
+    $self->report_msg("  Path:     $self->{target_path}") ;
+
     return 1 ;
     }
 
 # This method is essentialy do_init(). In the original SVN::Push there were
 # both init() and do_init() which were different from a reason. Here, they
 # are essentially the same.
-sub init 
+sub init
 {
     my $self = shift;
-    
+
     return $self -> do_init ;
-}    
+}
 
 # ------------------------------------------------------------------------
 
         $endrev = $self->{source_headrev};
     }
     $self->{endrev} = $endrev ;
-    
+
     my $startrev = $self->{startrev} || 0 ;
-    if (defined($self->{target_source_rev}) && 
+    if (defined($self->{target_source_rev}) &&
         ($self->{target_source_rev} + 1 > $startrev))
     {
         $startrev = $self->{target_source_rev} + 1;
     }
     $self->{startrev} = $startrev ;
-    
+
     return unless $endrev == -1 || $startrev <= $endrev;
 
     $self->report_msg("Retrieving log information from $startrev to $endrev");
 
     $self -> {source_ra} -> get_log (
         # paths
-        [''], 
+        [''],
         # start_rev
-        $startrev, 
+        $startrev,
         # end_rev
-        $endrev-1, 
+        $endrev-1,
         # limit
-        0, 
+        0,
         # discover_changed_paths
         1,
         # strict_node_history
                   {
                   my $e = $@ ;
                   $e =~ s/ at .+$// ;
-                  $self->report_msg($e) ; 
+                  $self->report_msg($e) ;
                   }
           });
 }

File module/t/cpan-changes.t

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval 'use Test::CPAN::Changes';
+plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
+
+changes_ok();
+

File module/t/style-trailing-space.t

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::TrailingSpace";
+if ($@)
+{
+    plan skip_all => "Test::TrailingSpace required for trailing space test.";
+}
+else
+{
+    plan tests => 1;
+}
+
+my $finder = Test::TrailingSpace->new(
+    {
+        root => '.',
+        filename_regex => qr/(?:(?:\.(?:t|pm|pl|PL|yml|json|arc|vim))|README|Changes|LICENSE)\z/,
+    },
+);
+
+# TEST
+$finder->no_trailing_space(
+    "No trailing space was found."
+);
+