Commit b945cae4 authored by Christophe Dumez's avatar Christophe Dumez

- removed LOG() calls


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8139 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4da31d1a
......@@ -48,7 +48,6 @@ from OFS.Traversable import NotFound
from Products.ERP5Type.patches.copyTree import copytree, Error
from Products.ERP5Type.patches.cacheWalk import cacheWalk
from time import ctime
from zLOG import LOG
try:
import pysvn
......@@ -1031,7 +1030,6 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
""" Return tree of files returned by svn status
"""
# Get subversion path without business template name at the end
LOG('Debut getModifiedTree: ', 1, ctime())
bt_path = self._getWorkingPath(self.getSubversionPath(business_template, \
False))
if bt_path[-1] != '/':
......@@ -1039,10 +1037,8 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
# Business template root directory is the root of the tree
root = Dir(business_template.getTitle(), "normal")
something_modified = False
LOG('Debut svn Status: ', 1, ctime())
statusObj_list = self.status(os.path.join(bt_path, \
business_template.getTitle()))
LOG('Fin svn Status: ', 1, ctime())
# We browse the files returned by svn status
for status_obj in statusObj_list :
# can be (normal, added, modified, deleted, conflicted, unversioned)
......@@ -1080,7 +1076,6 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
else :
# add new file to the tree
parent.sub_files.append(File(filename, str(status)))
LOG('fin getModifiedTree: ', 1, ctime())
return something_modified and root
def extractBT(self, business_template):
......@@ -1089,24 +1084,18 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
and do svn add/del stuff comparing it
to local working copy
"""
LOG('Debut extractBT: ', 1, ctime())
business_template.build()
LOG('-> Fin BuildBT: ', 1, ctime())
svn_path = self._getWorkingPath(self.getSubversionPath(business_template) \
+ os.sep)
path = mktemp() + os.sep
try:
# XXX: Big hack to make export work as expected.
get_transaction().commit()
LOG('-> deb exportBT: ', 1, ctime())
business_template.export(path=path, local=1)
LOG('-> Fin exportBT: ', 1, ctime())
LOG('-> Deb comparaison + cp -rf: ', 1, ctime())
# svn del deleted files
self.deleteOldFiles(svn_path, path)
# add new files and copy
self.addNewFiles(svn_path, path)
LOG('-> Fin comparaison + cp -rf: ', 1, ctime())
self.goToWorkingCopy(business_template)
except (pysvn.ClientError, NotFound, AttributeError, \
Error), error:
......@@ -1115,7 +1104,6 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
raise error
# Clean up
self.activate().removeAllInList([path, ])
LOG('End extractBT: ', 1, ctime())
def importBT(self, business_template):
"""
......@@ -1222,12 +1210,10 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
def treeToXML(self, item, business_template) :
""" Convert tree in memory to XML
"""
LOG('Debut treeToXML: ', 1, ctime())
output = '<?xml version="1.0" encoding="UTF-8"?>'+ os.linesep
output += "<tree id='0'>" + os.linesep
output = self._treeToXML(item, output, business_template.getTitle(), True)
output += '</tree>' + os.linesep
LOG('Fin treeToXML: ', 1, ctime())
return output
def _treeToXML(self, item, output, relative_path, first) :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment