[aur-dev] [PATCH] git-serve: Add out-of-date status to list-repos
Signed-off-by: Johannes Löthberg <johannes@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
On Tue, 28 Jul 2015 at 18:52:20, Johannes Löthberg wrote:
Signed-off-by: Johannes Löthberg <johannes@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 '!',
Since it makes no sense for empty packages to be out-of-date, would it be a good idea to use a 3-state flag ('*', ' ', '!') instead? Might be a bad idea if we plan to add more information to that output...
+ pkgbase=row[0])) db.close()
def create_pkgbase(pkgbase, user): -- 2.4.6
On Wed 29 Jul 2015 11:57 +0200, Lukas Fleischer wrote:
On Tue, 28 Jul 2015 at 18:52:20, Johannes Löthberg wrote:
Signed-off-by: Johannes Löthberg <johannes@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 '!',
Since it makes no sense for empty packages to be out-of-date, would it be a good idea to use a 3-state flag ('*', ' ', '!') instead? Might be a bad idea if we plan to add more information to that output...
Why wouldn't you just print the timestamp?
On 29/07, Loui Chang wrote:
On Wed 29 Jul 2015 11:57 +0200, Lukas Fleischer wrote:
On Tue, 28 Jul 2015 at 18:52:20, Johannes Löthberg wrote:
Signed-off-by: Johannes Löthberg <johannes@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 '!',
Since it makes no sense for empty packages to be out-of-date, would it be a good idea to use a 3-state flag ('*', ' ', '!') instead? Might be a bad idea if we plan to add more information to that output...
Why wouldn't you just print the timestamp?
Because that would make it an even worse idea if we plan on adding more information to the output, since it would make it even more messy, and not really provide much information. -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
On Wed 29 Jul 2015 17:47 +0200, Johannes Löthberg wrote:
On 29/07, Loui Chang wrote:
On Wed 29 Jul 2015 11:57 +0200, Lukas Fleischer wrote:
Since it makes no sense for empty packages to be out-of-date, would it be a good idea to use a 3-state flag ('*', ' ', '!') instead? Might be a bad idea if we plan to add more information to that output...
Why wouldn't you just print the timestamp?
Because that would make it an even worse idea if we plan on adding more information to the output, since it would make it even more messy, and not really provide much information.
If you want to add more info better use more descriptive output then. So sounds like the formatting should be changed so that it's not messy. What other info do you want to add?
On Thu, 30 Jul 2015 at 03:01:40, Loui Chang wrote:
On Wed 29 Jul 2015 17:47 +0200, Johannes Löthberg wrote:
On 29/07, Loui Chang wrote:
On Wed 29 Jul 2015 11:57 +0200, Lukas Fleischer wrote:
Since it makes no sense for empty packages to be out-of-date, would it be a good idea to use a 3-state flag ('*', ' ', '!') instead? Might be a bad idea if we plan to add more information to that output...
Why wouldn't you just print the timestamp?
Because that would make it an even worse idea if we plan on adding more information to the output, since it would make it even more messy, and not really provide much information.
If you want to add more info better use more descriptive output then. So sounds like the formatting should be changed so that it's not messy. What other info do you want to add?
How about only showing the package base names when running `list-repos` and providing more detailed information with `list-repos -l`?
On Tue 04 Aug 2015 05:53 +0200, Lukas Fleischer wrote:
On Thu, 30 Jul 2015 at 03:01:40, Loui Chang wrote:
If you want to add more info better use more descriptive output then. So sounds like the formatting should be changed so that it's not messy. What other info do you want to add?
How about only showing the package base names when running `list-repos` and providing more detailed information with `list-repos -l`?
Good idea.
On 29/07, Lukas Fleischer wrote:
On Tue, 28 Jul 2015 at 18:52:20, Johannes Löthberg wrote:
Signed-off-by: Johannes Löthberg <johannes@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 '!',
Since it makes no sense for empty packages to be out-of-date, would it be a good idea to use a 3-state flag ('*', ' ', '!') instead? Might be a bad idea if we plan to add more information to that output...
Hmm, that's an interesting idea. I'm unsure actually..
+ pkgbase=row[0])) db.close()
def create_pkgbase(pkgbase, user): -- 2.4.6
-- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
participants (3)
-
Johannes Löthberg
-
Loui Chang
-
Lukas Fleischer