Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 42057:566daffc607d
cleanup: use set literals where possible
Differential Revision: https://phab.mercurial-scm.org/D6192
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 03 Apr 2019 11:21:27 -0700 |
parents | 550a172a603b |
children | db72f9f6580e |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Wed Jul 19 13:17:49 2017 -0700 +++ b/mercurial/cmdutil.py Wed Apr 03 11:21:27 2019 -0700 @@ -458,7 +458,7 @@ def __init__(self, dirpath): self.path = dirpath - self.statuses = set([]) + self.statuses = set() self.files = [] self.subdirs = {} @@ -2495,8 +2495,7 @@ if len(old.parents()) > 1: # ctx.files() isn't reliable for merges, so fall back to the # slower repo.status() method - files = set([fn for st in base.status(old)[:3] - for fn in st]) + files = {fn for st in base.status(old)[:3] for fn in st} else: files = set(old.files())