Commit 46741c41 authored by Christophe Dumez's avatar Christophe Dumez

- Now detect outdated files (displayed in purple)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8323 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 033eb918
......@@ -244,7 +244,14 @@ try:
def status(self, path, **kw):
# Since plain Python classes are not convenient in
# Zope, convert the objects.
status_list = [Status(x) for x in self.client.status(path, **kw)]
try:
status_list = [Status(x) for x in self.client.status(path=path, **kw)]
except pysvn.ClientError, error:
excep = self.getException()
if excep:
raise excep
else:
raise error
# XXX: seems that pysvn return a list that is
# upside-down, we reverse it...
status_list.reverse()
......
......@@ -1045,11 +1045,13 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
root = Dir(business_template.getTitle(), "normal")
something_modified = False
statusObj_list = self.status(os.path.join(bt_path, \
business_template.getTitle()))
business_template.getTitle()), update=True)
# We browse the files returned by svn status
for status_obj in statusObj_list :
# can be (normal, added, modified, deleted, conflicted, unversioned)
status = str(status_obj.getTextStatus())
if str(status_obj.getReposTextStatus()) != 'none':
status = "outdated"
if (show_unmodified or status != "normal") and status != "unversioned":
something_modified = True
# Get object path
......@@ -1238,6 +1240,8 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
color = 'red'
elif status == 'conflicted' :
color = 'grey'
elif status == 'outdated' :
color = 'purple'
else :
color = 'black'
if isinstance(item, Dir) :
......
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