Patchwork split: use literal syntax to build a set of one element

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 8, 2019, 9:54 a.m.
Message ID <d9ab8eb5616cf509da1c.1567936490@mimosa>
Download mbox | patch
Permalink /patch/41570/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 8, 2019, 9:54 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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
Augie Fackler - Sept. 9, 2019, 2:58 p.m.
On Sun, Sep 08, 2019 at 06:54:50PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@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

queued, thanks

Patch

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):