[aur-dev] [PATCH] git-serve: Add out-of-date status to list-repos

Johannes Löthberg johannes at kyriasis.com
Tue Jul 28 16:52:20 UTC 2015


Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
---
Note: I haven't been able to test this due to not having access to my 
regular laptop, but it should work.

 git-interface/git-serve.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/git-interface/git-serve.py b/git-interface/git-serve.py
index 8316cf7..2ee44dc 100755
--- a/git-interface/git-serve.py
+++ b/git-interface/git-serve.py
@@ -47,10 +47,13 @@ def list_repos(user):
     if userid == 0:
         die('{:s}: unknown user: {:s}'.format(action, user))
 
-    cur.execute("SELECT Name, PackagerUID FROM PackageBases " +
+    cur.execute("SELECT Name, PackagerUID, OutOfDateTS FROM PackageBases " +
                 "WHERE MaintainerUID = %s ", [userid])
     for row in cur:
-        print((' ' if row[1] else '*') + row[0])
+        print('{empty}{outofdate}{pkgbase}'.format(
+            empty=' ' if row[1] else '*',
+            outofdate=' ' if row[2] else '!',
+            pkgbase=row[0]))
     db.close()
 
 def create_pkgbase(pkgbase, user):
-- 
2.4.6


More information about the aur-dev mailing list