Commit a40a6abb authored by Christophe Dumez's avatar Christophe Dumez

- little optimization


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7249 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f2d7f9d6
...@@ -845,22 +845,22 @@ class SubversionTool(BaseTool, UniqueObject, Folder): ...@@ -845,22 +845,22 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
somethingModified = True somethingModified = True
full_path = statusObj.getPath() full_path = statusObj.getPath()
full_path_list = full_path.split(os.sep)[1:] full_path_list = full_path.split(os.sep)[1:]
relative_path = full_path[len(path)+1:] relative_path_list = full_path[len(path)+1:].split(os.sep)
relative_path_list = relative_path.split(os.sep)
# Processing entry # Processing entry
filename = relative_path_list[-1] filename = relative_path_list[-1]
# Needed or files will be both File & Dir objects # Needed or files will be both File & Dir objects
relative_path_list = relative_path_list[:-1] relative_path_list = relative_path_list[:-1]
parent = root parent = root
i = len(path.split(os.sep))-1 i = len(path.split(os.sep))
for d in relative_path_list : for d in relative_path_list :
i += 1
if d : if d :
full_pathOfd = os.sep+os.sep.join(full_path_list[:i]).strip() full_pathOfd = os.sep+os.sep.join(full_path_list[:i]).strip()
if d not in parent.getSubDirs() : if d not in parent.getSubDirs() :
parent.sub_dirs.append(Dir(full_pathOfd, "normal")) parent.sub_dirs.append(Dir(full_pathOfd, "normal"))
parent = parent.getDir(d) parent = parent.getDir(d)
i += 1
if os.path.isdir(full_path) : if os.path.isdir(full_path) :
if full_path == parent.full_path : if full_path == parent.full_path :
parent.msg_status = str(msg_status) parent.msg_status = str(msg_status)
......
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