absorb: use set literal to avoid intermediate list
authorAugie Fackler <augie@google.com>
Wed, 01 Aug 2018 18:23:42 -0400
changeset 38919 dc4750b2a04e
parent 38918 2ac40e86f604
child 38920 a5c8c5476339
absorb: use set literal to avoid intermediate list Differential Revision: https://phab.mercurial-scm.org/D4044
hgext/absorb.py
--- 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))