You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2006/02/28 22:16:29 UTC

svn commit: r381784 - /perl/modperl/trunk/build/svn.remerge

Author: stas
Date: Tue Feb 28 13:16:27 2006
New Revision: 381784

URL: http://svn.apache.org/viewcvs?rev=381784&view=rev
Log:
make the script more portable: sed parts didn't work on Solaris 9, use perl 
instead

Modified:
    perl/modperl/trunk/build/svn.remerge

Modified: perl/modperl/trunk/build/svn.remerge
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/build/svn.remerge?rev=381784&r1=381783&r2=381784&view=diff
==============================================================================
--- perl/modperl/trunk/build/svn.remerge (original)
+++ perl/modperl/trunk/build/svn.remerge Tue Feb 28 13:16:27 2006
@@ -1,14 +1,18 @@
 #!/bin/bash
 # automatic SVN merging
+#
+# when used for the first time, first run:
+#  svn propset merge-point $revision
+# where $revision is the rev number when a branch was made
 
-root=`svn info . | sed -n '/^URL/{s,/branches/.*,,;s/^URL: //;p}'`
+root=`svn info . | perl -007 -ne 'm|URL: (.*?)/branches|s and print $1'`
 trunk=${root}/trunk
 
 # svn 1.2.x supports "svn info URL".  Without that, a stupid
 # ls command is needed to find the current revision of the trunk
 #next=`svn info $trunk | sed -n '/^Revision: /{s/.*: //g;p}'`
 
-next=`svn ls --verbose $root | sed -n '/ trunk/{s/^ *//g;s/ .*//g;p}'`
+next=`svn ls --verbose $root | perl -ne 'm|^\s+(\d+).*trunk/$| and print $1'`
 last=`svn propget merge-point .`
 
 echo "$0: merging from trunk from r$last to r$next"