[PATCH] split: use literal syntax to build a set of one element

Yuya Nishihara yuya at tcha.org
Sun Sep 8 05:54:50 EDT 2019


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1567726368 -32400
#      Fri Sep 06 08:32:48 2019 +0900
# Node ID d9ab8eb5616cf509da1ccd3f83aa54ea3b1aa6cc
# Parent  775224e26d747f9d0aee5211e34e87d728e08b29
split: use literal syntax to build a set of one element

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -187,7 +187,7 @@ def newandmodified(chunks, originalchunk
             originalchunks):
             newlyaddedandmodifiedfiles.add(chunk.header.filename())
             alsorestore.update(set(chunk.header.files()) -
-                               set([chunk.header.filename()]))
+                               {chunk.header.filename()})
     return newlyaddedandmodifiedfiles, alsorestore
 
 def parsealiases(cmd):


More information about the Mercurial-devel mailing list