Commit a29c1f5e authored by Christophe Dumez's avatar Christophe Dumez

- added functions regarding unversioned files


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6794 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f2cfb15a
...@@ -678,6 +678,27 @@ class SubversionTool(UniqueObject, Folder): ...@@ -678,6 +678,27 @@ class SubversionTool(UniqueObject, Folder):
client = self._getClient() client = self._getClient()
return client.status(path, **kw) return client.status(path, **kw)
security.declareProtected('Import/Export objects', 'unversionedFiles')
def unversionedFiles(self, path, **kw):
"""Return unversioned files
"""
client = self._getClient()
status_list = client.status(path, **kw)
unversioned_list = []
for statusObj in status_list:
if str(statusObj.getTextStatus()) == "unversioned":
my_dict = {}
my_dict['uid'] = statusObj.getPath()
unversioned_list.append(my_dict)
return unversioned_list
security.declareProtected('Import/Export objects', 'removeAllInList')
def removeAllInList(self, list):
"""Remove all files and folders in list
"""
for file in list:
removeAll(file)
def getModifiedTree(self, path) : def getModifiedTree(self, path) :
# Remove trailing slash if it's present # Remove trailing slash if it's present
if path[-1] == os.sep : if path[-1] == os.sep :
......
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