[PATCH 2 of 2 V2] summary, changelog: add reviewer username to status change tooltips

Angel Ezquerra angel.ezquerra at gmail.com
Wed Feb 24 21:39:22 UTC 2016


On Mon, Feb 22, 2016 at 9:11 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 02/21/2016 12:10 PM, Angel Ezquerra wrote:
>>
>> # HG changeset patch
>> # User Angel Ezquerra <angel.ezquerra at gmail.com>
>> # Date 1456052683 -3600
>> #      Sun Feb 21 12:04:43 2016 +0100
>> # Branch stable
>> # Node ID e28802b277d61139d193c5c1833504398bcf3973
>> # Parent  1b8fa58fddda34e218c31f61bc571a342f7e96fc
>> summary, changelog: add reviewer username to status change tooltips
>>
>> Change the status change (circle) icon tooltips from "Changeset status:
>> NEW_STATE" to "Changeset status: NEWSTATE by REVIEWER_USERNAME".
>>
>> This makes it much faster to check who is reviewing what and who approved
>> or
>> rejected what.
>
>
> Thanks! Perfect! Pushed!

Thank you!!! :-D

>> diff --git a/kallithea/model/db.py b/kallithea/model/db.py
>> --- a/kallithea/model/db.py
>> +++ b/kallithea/model/db.py
>> @@ -1411,7 +1411,8 @@
>>                   pr_nice_id = PullRequest.make_nice_id(pr_id)
>>                   pr_repo = stat.pull_request.other_repo.repo_name
>>               grouped[stat.revision] = [str(stat.status), stat.status_lbl,
>> -                                      pr_id, pr_repo, pr_nice_id]
>> +                                      pr_id, pr_repo, pr_nice_id,
>> +                                      stat.author]
>>           return grouped
>
>
> Perfect, except this function which is a mess causing other mess and
> apparently just should be cleaned up to return the stat objects and use a
> smarter sql expression ... ;-)

It really is a mess. Possibly it would be much better to return the
stat object as you suggest, but there are _a lot_ of places in the
code where that function nis used. An alternative that I thought about
would be to return a named tuple instead...

Cheers,

Angel


More information about the kallithea-general mailing list