office-gobmx/solenv/bin/cwstouched.py
Rüdiger Timm 23d0e016ea CWS-TOOLING: integrate CWS qadev34
2008-11-24 12:04:37 +0100 cn  r264220 : #i96037 bugfix: remove superfluous exclamation mark 
2008-11-20 20:52:21 +0100 cn  r264100 : #i95964 fixes for cygwin
2008-11-20 12:10:41 +0100 cn  r264040 : #i95964 replacesment for cwsquery modules
2008-11-10 10:29:48 +0100 cn  r263511 : #i96037 register installoffice.oxt
2008-11-07 15:44:58 +0100 cn  r263423 : #i95964# changes for 'cwstouched' wihch is a replacemant for 'cwsquery modules' 
2008-10-31 14:04:47 +0100 cn  r262866 : #i95303# add XDEBUG variable
2008-10-31 14:03:39 +0100 cn  r262865 : #i95610# update lists
2008-10-31 09:47:27 +0100 cn  r262855 : #i95303# bugfix
2008-10-31 09:47:06 +0100 cn  r262854 : #i95303# bugfix
2008-10-30 21:42:14 +0100 cn  r262837 : #i95204 remove -OOO_EnvSet parameter
2008-10-30 21:33:18 +0100 cn  r262836 : #i95304 add -enableautomation as soffice parameter
2008-10-30 10:20:24 +0100 cn  r262822 : #i95610 update lists
2008-10-27 22:00:00 +0100 cn  r262691 : #i95513#: add support for -runnerini as aditional ini file
2008-10-27 21:35:17 +0100 cn  r262690 : #i95513# use -runnerini instead of -ini
2008-10-23 13:41:32 +0200 cn  r262621 : #i95303# changes to run cwscheckapi in cygwin environment
2008-10-22 10:18:36 +0200 cn  r262581 : #i95304# disable QuckStarter while trying to dispose the office
2008-10-22 09:59:39 +0200 cn  r262580 : #i95303# add cygwin related stuff
2008-10-22 09:59:10 +0200 cn  r262579 : #i95303# add cygwin related stuff
2008-10-22 09:57:40 +0200 cn  r262578 : #i95303# add property CYGWIN
2008-11-26 12:04:07 +00:00

104 lines
No EOL
3.3 KiB
Python
Executable file

#!/usr/bin/python
#*************************************************************************
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#***********************************************************************/
import os
import sys
import string
from os import path
def getCurrPath():
currPath = sys.path[0] or os.getcwd()
currPath = path.abspath(currPath)
return currPath
def getCwsWorkStamp():
cwsWorkStamp=os.getenv('CWS_WORK_STAMP')
if not cwsWorkStamp:
currPath=getCurrPath()
os.chdir(os.getenv('SOLARENV'))
(input, output) = os.popen4("svn info")
for outline in output.readlines():
if outline.startswith("URL:"):
cwsWorkStamp = outline[outline.index("svn.services"):outline.index("solenv")-1]
cwsWorkStamp = cwsWorkStamp[cwsWorkStamp.rfind("/")+1:len(cwsWorkStamp)]
break
os.putenv("CWS_WORK_STAMP",cwsWorkStamp);
os.chdir(currPath)
return string.strip(cwsWorkStamp)
def getMinor(cwsWorkStamp):
minor = os.getenv('UPDMINOR')
if not minor:
if (os.getenv('OSTYPE') == "cygwin"):
bash=os.getenv("SHELL")
(input, output) = os.popen4("cygpath -w "+bash)
winbash=string.strip(output.readlines()[0])
cws=winbash+" -c 'cws query -c "+cwsWorkStamp+" current'"
else:
cws="cws query -c "+cwsWorkStamp+" current"
(input, output) = os.popen4(cws)
found=0
for outline in output.readlines():
if found:
minor=outline
break
elif outline.find("Current milestone:") != -1:
found=1
return string.strip(minor)
workstamp = os.getenv('WORK_STAMP')
solenv= os.getenv('SOLARENV')
cwsWorkStamp=getCwsWorkStamp()
minor = getMinor(cwsWorkStamp)
oldWorkStamp = workstamp + "_" + minor
diff="svn diff --summarize --old=svn://svn.services.openoffice.org/ooo/tags/"+oldWorkStamp+" --new=svn://svn.services.openoffice.org/ooo/cws/"+cwsWorkStamp
modules=[]
(input, output) = os.popen4(diff)
for outline in output.readlines():
if outline.find("svn://svn.services.openoffice.org"):
index = outline.index(oldWorkStamp)+len(oldWorkStamp)+1
newModule=outline[index:outline.index("/",index)]
if not modules.count(newModule):
modules.append(newModule)
for module in modules:
print module