changeset 147:7718e4d9a019

Fix hg "status" object changing from tuple to object This should still work with the older tuple version as well because it had properties and index-based access was a hack
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Mar 2020 18:51:07 +0000
parents c67c56b569d8
children a6fe8d1f5a13
files prompt.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/prompt.py	Sun Feb 23 16:05:18 2020 +0000
+++ b/prompt.py	Sat Mar 21 18:51:07 2020 +0000
@@ -314,10 +314,9 @@
 
     def _status(m):
         g = m.groups()
-
-        st = repo.status(unknown=True)[:5]
-        modified = any(st[:4])
-        unknown = len(st[-1]) > 0
+        st = repo.status(unknown=True)
+        modified = any([st.modified, st.added, st.removed, st.deleted])
+        unknown = len(st.unknown) > 0
 
         flag = b''
         if b'|modified' not in g and b'|unknown' not in g: