Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /svnutils/trunk/src/mergesvn

svnutils
Discussion topic

Back to topic list

CVS update: /svnutils/trunk/src/mergesvn

Author sunny256
Full name Øyvind A. Holm
Date 2007-02-25 14:34:45 PST
Message User: sunny256
Date: 2007-02-25 14:34:45-0800
Log:
 r175 | sunny256 | 2007-02-24 10:31:12 +0000 (Sat, 24 Feb 2007) | 3 lines
 
 * /trunk/src/mergesvn
   Added the "-a"/"--alias" option.

File Changes:

Directory: /svnutils/trunk/src/
===============================

File [changed]: mergesvn
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​mergesvn?r1=1.3&​r2=1.4
Delta lines: +22 -6
--------------------
--- mergesvn 2007-02-20 04:33:14-0800 1.3
+++ mergesvn 2007-02-25 14:34:43-0800 1.4
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 #===================​====================​====================​============
-# $Id: mergesvn 174 2007-02-17 23:08:03Z sunny $
+# $Id: mergesvn 175 2007-02-24 10:31:12Z sunny256 $
 # Merges new changes into a file version controlled by Subversion.
 #
 # Character set: UTF-8
@@ -17,6 +17,7 @@
 our $Debug = 0;
 
 our %Opt = (
+ 'alias' => "",
     'debug' => 0,
     'help' => 0,
     'to' => "HEAD",
@@ -26,12 +27,13 @@
 our $progname = $0;
 $progname =~ s#^.*/(.*?)$#$1#;
 
-my $rcs_id = '$Id: mergesvn 174 2007-02-17 23:08:03Z sunny $';
+my $rcs_id = '$Id: mergesvn 175 2007-02-24 10:31:12Z sunny256 $';
 my $id_date = $rcs_id;
 $id_date =~ s/^.*?\d+ (\d\d\d\d-.*?\d​\d:\d\d:\d\d\S​+).*/$1/;
 
 Getopt::Long::Config​ure("bundling");
 GetOptions(
+ "alias|a=s" => \$Opt{'alias'},
     "debug" => \$Opt{'debug'},
     "help|h" => \$Opt{'help'},
     "to|t=s" => \$Opt{'to'},
@@ -73,7 +75,9 @@
             my ($last_merge, $master_file) =
                ( $1, $2);
             $master_file =~ s/[\r\n]+$//;
- my $safe_master_file = escape_filename($master_file);
+ my $safe_master_file = escape_filename(
+ length($Opt{'alias'}) ? $Opt{'alias'} : $master_file
+ );
             mysyst($CMD_SVN, "update", $File);
             my $curr_rev = `$CMD_SVN log -r$Opt{'to'}:1 --limit 1 --xml $safe_master_file`; # FIXME
             $curr_rev =~ s/^.*<logentry.+?​revision="(\d+)".*?​>.*/$1/s;
@@ -81,7 +85,11 @@
                 warn("$progname: $master_file: Unable to get newest revision\n");
                 next LOOP;
             }
- mysyst($CMD_SVN, "merge", "-r$last_merge:$curr_rev", $master_file, $File);
+ mysyst(
+ $CMD_SVN, "merge", "-r$last_merge:$curr_rev",
+ length($Opt{'alias'}) ? $Opt{'alias'} : $master_file,
+ $File
+ );
             push(@new_prop, "$curr_rev $master_file");
         } else {
             warn("$File: \"$Curr\": Invalid property line\n");
@@ -147,6 +155,9 @@
 
 Options:
 
+ -a x, --alias x
+ Use x as alias for the URL. The old value will still be written to
+ the mergesvn property.
   -h, --help
     Show this help.
   -t x, --to x
@@ -186,7 +197,7 @@
 
 =head1 REVISION
 
-$Id: mergesvn 174 2007-02-17 23:08:03Z sunny $
+$Id: mergesvn 175 2007-02-24 10:31:12Z sunny256 $
 
 =head1 SYNOPSIS
 
@@ -216,6 +227,11 @@
 
 =over 4
 
+=item B<-a>, B<--alias> I<x>
+
+Use I<x> as alias for the URL. The old value will still be written to
+the mergesvn property.
+
 =item B<-h>, B<--help>
 
 Print a brief help summary.
@@ -266,4 +282,4 @@
 # }}}
 
 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
-# End of file $Id: mergesvn 174 2007-02-17 23:08:03Z sunny $
+# End of file $Id: mergesvn 175 2007-02-24 10:31:12Z sunny256 $

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /svnutils/trunk/src/mergesvn sunny256 Øyvind A. Holm 2007-02-25 14:34:45 PST
Messages per page: