diff mercurial/revlogutils/rewrite.py @ 52676:f066fc0bdc7a

pyupgrade: use set literals where possible This was rewritten by the `set_literals` fixer in `pyupgrade`. I thought there was a past change around using set literals, but I can't find it now.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 06 Jan 2025 01:33:08 -0500
parents 7346f93be7a4
children f19a3f1437f3
line wrap: on
line diff
--- a/mercurial/revlogutils/rewrite.py	Mon Jan 06 01:27:42 2025 -0500
+++ b/mercurial/revlogutils/rewrite.py	Mon Jan 06 01:33:08 2025 -0500
@@ -60,7 +60,7 @@
     # avoid cycle
     from .. import revlog
 
-    censor_revs = set(rl.rev(node) for node in censor_nodes)
+    censor_revs = {rl.rev(node) for node in censor_nodes}
     tombstone = storageutil.packmeta({b'censored': tombstone}, b'')
 
     # Rewriting the revlog in place is hard. Our strategy for censoring is
@@ -732,9 +732,9 @@
                 continue
             filenodes, filename = line.split(b' ', 1)
             fl = _filelog_from_filename(repo, filename)
-            to_fix = set(
+            to_fix = {
                 fl.rev(binascii.unhexlify(n)) for n in filenodes.split(b',')
-            )
+            }
             excluded = set()
 
             for filerev in to_fix: