Commit 2bbd3101 authored by Christophe Dumez's avatar Christophe Dumez

- added function to get last changelog of a business template


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7357 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c8c06c0c
......@@ -875,6 +875,24 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
client = self._getClient()
return client.checkin(path, log_message, recurse)
security.declareProtected('Import/Export objects', 'getLastChangelog')
def getLastChangelog(self, bt):
"""Return last changelog of a business template
"""
bt_path = self._getWorkingPath(self.getSubversionPath(bt))
changelog_path = bt_path + os.sep + 'bt' + os.sep + 'change_log'
changelog=""
if os.path.exists(changelog_path):
changelog_file = open(changelog_path, 'r')
changelog_lines = changelog_file.readlines()
changelog_file.close()
for line in changelog_lines:
if line.strip() == '':
break
changelog+=line
return changelog
security.declareProtected('Import/Export objects', 'status')
def status(self, path, **kw):
"""Get 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