[Erp5-report] r44024 jm - /erp5/trunk/products/ERP5VCS/Git.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 7 21:00:23 CET 2011


Author: jm
Date: Mon Mar  7 21:00:23 2011
New Revision: 44024

URL: http://svn.erp5.org?rev=44024&view=rev
Log:
ERP5VCS: fix and sort tree of modified files on Git status tab

Modified:
    erp5/trunk/products/ERP5VCS/Git.py

Modified: erp5/trunk/products/ERP5VCS/Git.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5VCS/Git.py?rev=44024&r1=44023&r2=44024&view=diff
==============================================================================
--- erp5/trunk/products/ERP5VCS/Git.py [utf8] (original)
+++ erp5/trunk/products/ERP5VCS/Git.py [utf8] Mon Mar  7 21:00:23 2011
@@ -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:



More information about the Erp5-report mailing list