This instance will be upgraded to Heptapod 0.21.0rc2 on 2021-04-16 at 11:00 UTC+2 (a few minutes of down time)

Commit 36b4d902 authored by Manuel Jacob's avatar Manuel Jacob

cleanup: replace pattern with sorted()

parent 931e570150b8
......@@ -161,9 +161,7 @@ class ArchiveWidget(cmdui.AbstractCmdWidget):
self.rev_combo.addItem(WD_PARENT)
self.rev_combo.addItems(pycompat.maplist(hglib.tounicode,
hglib.namedbranches(self.repo)))
tags = list(self.repo.tags())
tags.sort(reverse=True)
for t in tags:
for t in sorted(self.repo.tags(), reverse=True):
self.rev_combo.addItem(hglib.tounicode(t))
if rev:
text = hglib.tounicode(str(rev))
......
......@@ -162,10 +162,8 @@ class TagDialog(QDialog):
""" update display on dialog with recent repo data """
cur = self.tagCombo.currentText()
tags = list(self.repo.tags())
tags.sort(reverse=True)
self.tagCombo.clear()
for tag in tags:
for tag in sorted(self.repo.tags(), reverse=True):
if tag in (b'tip', b'qbase', b'qtip', b'qparent'):
continue
self.tagCombo.addItem(hglib.tounicode(tag))
......
......@@ -68,9 +68,7 @@ class StripWidget(cmdui.AbstractCmdWidget):
for name in hglib.namedbranches(self.repo):
combo.addItem(hglib.tounicode(name))
tags = list(self.repo.tags())
tags.sort(reverse=True)
for tag in tags:
for tag in sorted(self.repo.tags(), reverse=True):
combo.addItem(hglib.tounicode(tag))
### preview box, contained in scroll area, contains preview grid
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment