[Amavisadmin-svn] SF.net SVN: amavisadmin: [20] amavisadmin/branches
Status: Beta
Brought to you by:
streindl
From: <str...@us...> - 2007-01-17 18:37:40
|
Revision: 20 http://amavisadmin.svn.sourceforge.net/amavisadmin/?rev=20&view=rev Author: streindl Date: 2007-01-17 10:23:00 -0800 (Wed, 17 Jan 2007) Log Message: ----------- First branch for uni stuff Modified Paths: -------------- amavisadmin/branches/UNI/tools/reposInfo.pl Added Paths: ----------- amavisadmin/branches/UNI/ Copied: amavisadmin/branches/UNI (from rev 19, amavisadmin/trunk) Modified: amavisadmin/branches/UNI/tools/reposInfo.pl =================================================================== --- amavisadmin/trunk/tools/reposInfo.pl 2007-01-17 17:45:57 UTC (rev 19) +++ amavisadmin/branches/UNI/tools/reposInfo.pl 2007-01-17 18:23:00 UTC (rev 20) @@ -19,12 +19,14 @@ use SVK::XD; use Cwd; + my $op = shift; +my $_info = undef; # use svn info -my $funcRev = sub { +sub funcRev { my( $path, $info, $pool ) = @_; - print $info->rev; + $_info = $info; }; my $statusChanged = 0; @@ -35,7 +37,8 @@ my $ctx = SVN::Client->new(); if ($op eq "REV") { - $ctx->info( 'build.xml', undef, undef, $funcRev, 0 ); + $ctx->info( 'build.xml', undef, undef, \&funcRev, 0 ); + print $_info->rev; } elsif ($op eq "STATUS") { $ctx->status(getcwd(), undef, $funcStatus, 1, 0, 0, 0); if ($statusChanged) { @@ -51,4 +54,13 @@ print "BUILD"; } } elsif ($op eq "TAG") { + $ctx->info( 'build.xml', undef, undef, \&funcRev, 0 ); + my $url = $_info->URL; + if ($url =~ /trunk/) { + print "trunk"; + } elsif ($url =~ /branches\/([^\/]+)\//) { + print "branch $1"; + } elsif ($url =~ /tags\/([^\/]+)\//) { + print "tag $1"; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |