2 eval 'exec perl -wS $0 ${1+"$@"}'
5 #*************************************************************************
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 # Copyright 2008 by Sun Microsystems, Inc.
10 # OpenOffice.org - a multi-platform office productivity suite
12 # This file is part of OpenOffice.org.
14 # OpenOffice.org is free software: you can redistribute it and/or modify
15 # it under the terms of the GNU Lesser General Public License version 3
16 # only, as published by the Free Software Foundation.
18 # OpenOffice.org is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU Lesser General Public License version 3 for more details
22 # (a copy is included in the LICENSE file that accompanied this code).
24 # You should have received a copy of the GNU Lesser General Public License
25 # version 3 along with OpenOffice.org. If not, see
26 # <http://www.openoffice.org/license.html>
27 # for a copy of the LGPLv3 License.
28 #***********************************************************************/
36 if ( !defined($ENV{SOLARENV
}) ) {
37 die "No environment found (environment variable SOLARENV is undefined)";
39 push(@lib_dirs, "$ENV{SOLARENV}/bin/modules");
47 sub getCwsWorkStamp
();
49 my $workstamp = $ENV{'WORK_STAMP'};
50 my $solenv= $ENV{'SOLARENV'};
51 my $cwsWorkStamp = getCwsWorkStamp
();
52 my $minor = getMinor
($cwsWorkStamp);
54 my $oldWorkStamp = $workstamp."_".$minor;
55 my $svndiff="svn diff --summarize --old=svn://svn.services.openoffice.org/ooo/tags/".$oldWorkStamp." --new=svn://svn.services.openoffice.org/ooo/cws/".$cwsWorkStamp;
57 my @diff = `$svndiff`;
62 if (/.*svn:\/\
/svn.services.openoffice.org.*/)
64 $_ =~ /.*$oldWorkStamp\/(\w
*)/;
66 if (defined($newModule))
68 if ( ! grep(/$newModule/,@modules))
70 push(@modules, $newModule);
89 if ( ! defined($ENV{'UPDMINOR'}))
93 $cws->master($ENV{'WORK_STAMP'});
94 my $masterws = $cws->master();
95 my $childws = $cws->child();
97 # check if we got a valid child workspace
98 my $id = $cws->eis_id();
101 print("Child workspace '$childws' for master workspace '$masterws' not found in EIS database.\n");
105 my @milestones = $cws->milestone();
106 foreach (@milestones) {
115 $min = $ENV{'UPDMINOR'};
122 sub getCwsWorkStamp
()
126 if ( ! defined($ENV{'CWS_WORK_STAMP'}))
130 chdir($ENV{'SOLARENV'});
132 my @info = `svn info`;
138 # URL: svn+ssh://svn@svn.services.openoffice.org/ooo/cws/qadev37/solenv
139 $_ =
~ /.*svn.services.openoffice.org(.*\/(.*))\
/\w*/;
140 $cwsWorkSt=$2; #qadev37
147 $cwsWorkSt = $ENV{'CWS_WORK_STAMP'};