Patchwork [1,of,3] obsolete: clarify users in markerusers() never contain None

login
register
mail settings
Submitter Yuya Nishihara
Date July 16, 2018, 10:49 a.m.
Message ID <4625a49972b58bb56bed.1531738149@mimosa>
Download mbox | patch
Permalink /patch/32860/
State Accepted
Headers show

Comments

Yuya Nishihara - July 16, 2018, 10:49 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1531646560 -32400
#      Sun Jul 15 18:22:40 2018 +0900
# Node ID 4625a49972b58bb56bed7e618c71ef1742940a5c
# Parent  f749aaad0d2f52e3da2a8e80f44b798c0dd85f00
obsolete: clarify users in markerusers() never contain None

Patch

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -822,7 +822,7 @@  def markersusers(markers):
     """ Returns a sorted list of markers users without duplicates
     """
     markersmeta = [dict(m[3]) for m in markers]
-    users = set(meta.get('user') for meta in markersmeta if meta.get('user'))
+    users = set(meta['user'] for meta in markersmeta if meta.get('user'))
 
     return sorted(users)