From 559bcfdb33769dd1b9db499daf7443dae06d09a8 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 12 Oct 2021 19:48:03 +0000 Subject: [PATCH] More skip patchset-level comments in diff view Starting in Gerrit 3.3, comments can include a special file-id of /PATCHSET_LEVEL and these comments have no code context, thus no line numbers or related files. A previous change I6505d08b62ba7ad8877561a82732889e142873c3 attempted to skip these when enumerating comments in diff view, but mistakenly only did so on the new side of the diff. Apply the same skip to the old side as well. Change-Id: I22575015bd9e513d00024f026d2248c7a19c3d9e --- gertty/view/diff.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gertty/view/diff.py b/gertty/view/diff.py index 2180399..56de5a4 100644 --- a/gertty/view/diff.py +++ b/gertty/view/diff.py @@ -260,9 +260,11 @@ class BaseDiffView(urwid.WidgetWrap, mywid.Searchable): comment_lists[key] = comment_list comment_filenames.add(path) for comment in old_comments: + path = comment.file.path + if path == '/PATCHSET_LEVEL': # patchset-level comments in 3.3 + continue if comment.parent: continue - path = comment.file.path key = 'old' if comment.draft: key += 'draft'