changeset 50910:1270677d740b

terse-status: use `sysstr` to specify attributes to set We use unicode string to specify attribute and we add a explicit char for the other usage.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 30 Aug 2023 13:01:10 +0200
parents 35885dbdc927
children 1339158a8a40
files mercurial/cmdutil.py
diffstat 1 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Aug 30 00:50:28 2023 +0200
+++ b/mercurial/cmdutil.py	Wed Aug 30 13:01:10 2023 +0200
@@ -813,18 +813,17 @@
     # creating a dirnode object for the root of the repo
     rootobj = dirnode(b'')
     pstatus = (
-        b'modified',
-        b'added',
-        b'deleted',
-        b'clean',
-        b'unknown',
-        b'ignored',
-        b'removed',
+        ('modified', b'm'),
+        ('added', b'a'),
+        ('deleted', b'd'),
+        ('clean', b'c'),
+        ('unknown', b'u'),
+        ('ignored', b'i'),
+        ('removed', b'r'),
     )
 
     tersedict = {}
-    for attrname in pstatus:
-        statuschar = attrname[0:1]
+    for attrname, statuschar in pstatus:
         for f in getattr(statuslist, attrname):
             rootobj.addfile(f, statuschar)
         tersedict[statuschar] = []