sss: display the date in the svn status line
authorSofian Brabez <sbz@6dev.net>
Sat, 24 Nov 2018 23:13:58 +0000 (23:13 +0000)
committersbz <sbz@6dev.net>
Sat, 24 Nov 2018 23:13:58 +0000 (23:13 +0000)
sss

diff --git a/sss b/sss
index 9d386d20ea8a72f403ccee61508f0d3c50b3617a..d0fde7ea1254512cba08071a1fb972242b15c95c 100755 (executable)
--- a/sss
+++ b/sss
@@ -53,11 +53,13 @@ def main():
             root = ET.fromstring(xml_data)
             for commit in root.findall('logentry'):
                 author = commit.find('author').text
+                date = commit.find('date').text
                 shortmsg = commit.find('msg').text.split('\n')[0]
                 out['author'] = author
                 out['shortmsg'] = shortmsg
                 out['rev'] = commit.attrib.get('revision', 'norev')
-                svnmsg = "{status} {path}\t {shortmsg} | {rev} | {author}"
+                out['date'] = date.split('.')[0]
+                svnmsg = "{status} {path}\t {shortmsg} | {rev} | {author} | {date}"
                 print(svnmsg.format(**out))
         except:
             pass