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
This commit is contained in:
Jeremy Stanley 2021-10-12 19:48:03 +00:00
parent cc97078eb8
commit 559bcfdb33
1 changed files with 3 additions and 1 deletions

View File

@ -260,9 +260,11 @@ class BaseDiffView(urwid.WidgetWrap, mywid.Searchable):
comment_lists[key] = comment_list comment_lists[key] = comment_list
comment_filenames.add(path) comment_filenames.add(path)
for comment in old_comments: for comment in old_comments:
path = comment.file.path
if path == '/PATCHSET_LEVEL': # patchset-level comments in 3.3
continue
if comment.parent: if comment.parent:
continue continue
path = comment.file.path
key = 'old' key = 'old'
if comment.draft: if comment.draft:
key += 'draft' key += 'draft'