Commit 5ac1ea5d authored by Julien Muchembled's avatar Julien Muchembled

ERP5VCS: fix and sort tree of modified files on Git status tab

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44024 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a3b635c3
......@@ -174,8 +174,9 @@ class Git(WorkingCopy):
if parent:
path_list.append(parent)
else:
if path_dict[parent] != status:
path_dict[parent] = '*'
while path_dict.get(parent, status) != status:
path_dict[parent] = status = '*'
parent = os.path.dirname(parent)
status_dict = {'*': 'normal', '': 'normal', 'A': 'added', 'D': 'deleted',
'M': 'modified', 'U': 'conflicted'}
def dir_status(status):
......@@ -183,6 +184,7 @@ class Git(WorkingCopy):
root = Dir(os.path.normpath(self.prefix), dir_status(path_dict['']))
path_list = [(node_dict.pop(''), root)]
for content, node in path_list:
content.sort()
for path in content:
status = path_dict[path]
if show_unmodified or 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