Commit 68c47949 authored by Christophe Dumez's avatar Christophe Dumez

- keep on splitting HTML / python


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6503 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e14c77e8
...@@ -274,7 +274,21 @@ try: ...@@ -274,7 +274,21 @@ try:
def info(self, path): def info(self, path):
self._getPreferences() self._getPreferences()
return self.client.info(path=path) try:
entry = self.client.info(path=path)
except pysvn.ClientError, error:
excep = self.getException()
if excep:
raise excep
else:
raise error
# transform entry to dict to make it more usable in zope
members_tuple=('url', 'uuid', 'revision', 'kind', 'commit_author', 'commit_revision', 'commit_time',)
entry_dict = dict([(member,getattr(entry,member)) for member in members_tuple])
entry_dict['revision'] = entry_dict['revision'].number
entry_dict['commit_revision'] = entry_dict['commit_revision'].number
entry_dict['commit_time'] = time.ctime(entry_dict['commit_time'])
return entry_dict
def ls(self, path): def ls(self, path):
self._getPreferences() self._getPreferences()
......
...@@ -566,22 +566,6 @@ class SubversionTool(UniqueObject, Folder): ...@@ -566,22 +566,6 @@ class SubversionTool(UniqueObject, Folder):
client = self._getClient() client = self._getClient()
return client.cleanup(working_copy) return client.cleanup(working_copy)
security.declareProtected('Import/Export objects', 'infoHTML')
def infoHTML(self):
entry=self.info()
html='''<center><h1>Working Copy Informations</h1></center><br>
<center><table width='60%%' border='1'>
<tr height="18px"><td><b>Repository URL</b></td><td>%s</td></tr>
<tr height="18px"><td><b>Repository UUID</b></td><td>%s</td></tr>
<tr height="18px"><td><b>Revision</b></td><td>%s</td></tr>
<tr height="18px"><td><b>Node Type</b></td><td>%s</td></tr>
<tr height="18px"><td><b>Last Commit Author</b></td><td>%s</td></tr>
<tr height="18px"><td><b>Last Commit Revision</b></td><td>%s</td></tr>
<tr height="18px"><td><b>Last Commit Time</b></td><td>%s</td></tr>
</table></center>'''%(entry.url, entry.uuid, entry.revision.number, entry.kind, entry.commit_author, entry.commit_revision.number, time.ctime(entry.commit_time),)
return html
security.declareProtected('Import/Export objects', 'remove') security.declareProtected('Import/Export objects', 'remove')
def remove(self, path): def remove(self, path):
"""Remove a file or a directory. """Remove a file or a directory.
......
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