changeset 38958:dc4750b2a04e

absorb: use set literal to avoid intermediate list Differential Revision: https://phab.mercurial-scm.org/D4044
author Augie Fackler <augie@google.com>
date Wed, 01 Aug 2018 18:23:42 -0400
parents 2ac40e86f604
children a5c8c5476339
files hgext/absorb.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/absorb.py	Wed Aug 01 18:23:28 2018 -0400
+++ b/hgext/absorb.py	Wed Aug 01 18:23:42 2018 -0400
@@ -377,7 +377,7 @@
         if not involved and annotated: # a1 == a2 and a is not empty
             # pure insertion, check nearby lines. ignore lines belong
             # to the public (first) changeset (i.e. annotated[i][0] == 1)
-            nearbylinenums = set([a2, max(0, a1 - 1)])
+            nearbylinenums = {a2, max(0, a1 - 1)}
             involved = [annotated[i]
                         for i in nearbylinenums if annotated[i][0] != 1]
         involvedrevs = list(set(r for r, l in involved))