bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pvcs2rcs.in changes


From: Rob Benton
Subject: pvcs2rcs.in changes
Date: Thu, 09 Dec 2004 13:08:12 -0600
User-agent: Mozilla Thunderbird 0.8 (X11/20040926)

I made a few changes to the pvcs2rcs.in script in the contrib folder. They are for some deprecated stuff in perl >= 5.6.1 and some changes to handle filenames with spaces in them.






--- pvcs2rcs.in 2004-12-09 12:21:51.000000000 -0600
+++ pvcs2rcs.new    2004-12-09 12:51:56.000000000 -0600
@@ -115,6 +115,14 @@
# * questions, comments, additions can be sent to info-cvs@gnu.org
#########################################################################

+# ---------------------------------
+# Updated 12-8-2004
+# Rob Benton (rbento@acxiom.com)
+#
+# * Changed string comparisons to use the 'eq' operator instead '=='
+# * Surrounded workfiles with double quotes to protect filenames
+# with spaces.
+####################################


#
@@ -352,7 +360,7 @@
   my $error_count_ref;
   my $outstring;

-   if (ref ($_[0]) && ref ($_[0]) == "SCALAR")
+   if (ref ($_[0]) && ref ($_[0]) eq "SCALAR")
       {
       $error_count_ref = shift;
       }
@@ -582,7 +590,7 @@
       print("Verifying $abs_file...\n") if ($options{verbose});

       print "vlog $pvcsarchive\n";
-       my $vlog_output = `vlog $pvcsarchive`;
+       my $vlog_output = `vlog "$pvcsarchive"`;

       # Split the vcs status output into individual lines
       my @vlog_strings = split /\n/, $vlog_output;
@@ -775,7 +783,7 @@
           print "get -r$revision $pvcsarchive\n";
           # $vcs_output = `vcs -u -r$revision $pvcsarchive`;
           # $get_output = `get -p$revision $pvcsarchive >$workfile`;
-           $get_output = `get -r$revision $pvcsarchive`;
+           $get_output = `get -r$revision "$pvcsarchive"`;

           # if this is the first time, delete the rcs archive if it exists
           # need for $options{verify} == none
@@ -794,7 +802,7 @@
                       . ")\n";
                   }

-               $rcs_command .= " $workfile";
+               $rcs_command .= " \"$workfile\"";

               # print and execute the rcs archive initialization command
               print "$rcs_command\n";
@@ -829,7 +837,7 @@
$ci_command .= " -f -r$rcs_rev_num{$revision} -d$checked_in{$revision}"
                   . " -w$author{$revision}";

-           $ci_command .= " $workfile";
+           $ci_command .= " \"$workfile\"";

           # print and execute the ci command
           print "$ci_command\n";
@@ -848,7 +856,7 @@
       for( $i = $num_version_labels - 1; $i >= 0; $i -= 1 )
           {
# print "rcs -x,v -n$new_label[$i]:$label_revision[$i] $workfile\n"; - $rcs_output = `$rcs_base_command -n$new_label[$i]:$label_revision[$i] $workfile`; + $rcs_output = `$rcs_base_command -n$new_label[$i]:$label_revision[$i] "$workfile"`; print "Version label $new_label[$i] added to revision $label_revision[$i]\n";
           } # foreach label






reply via email to

[Prev in Thread] Current Thread [Next in Thread]