Commit f694a9d7 authored by Christophe Dumez's avatar Christophe Dumez

- bug fix


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6510 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb1496d6
......@@ -42,6 +42,7 @@ from zExceptions import Unauthorized
from OFS.Image import manage_addFile
from cStringIO import StringIO
from tempfile import mktemp
from zLOG import LOG
try:
from base64 import b64encode, b64decode
......@@ -678,17 +679,15 @@ class SubversionTool(UniqueObject, Folder):
def addNewFiles(self, old_dir, new_dir):
# detect created files
output = commands.getoutput('export LC_ALL=c;diff -rq %s %s --exclude .svn | grep "Only in " | grep -v "svn-commit." | grep %s | cut -d" " -f3,4'%(new_dir, old_dir, old_dir)).replace(': ', '/')
output = commands.getoutput('LC_ALL=C diff -rq %s %s --exclude .svn | grep "Only in " | grep -v "svn-commit." | grep %s | cut -d" " -f3,4'%(new_dir, old_dir, new_dir)).replace(': ', '/')
files_list = output.split('\n')
# Copy files
os.system('cp -af %s/* %s'%(new_dir, old_dir))
# svn add
for file in files_list:
if file:
try:
LOG("addNew", 0, 'adding '+ str(file))
self.add(file.replace(new_dir, old_dir))
except:
pass
def treeToXML(self, item) :
output = "<?xml version='1.0' encoding='iso-8859-1'?>"+ os.linesep
......
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