diff mercurial/exchange.py @ 32291:bd872f64a8ba

cleanup: use set literals We no longer support Python 2.6, so we can now use set literals.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 10 Feb 2017 16:56:29 -0800
parents df3cf9422e1b
children e70d6dbde713
line wrap: on
line diff
--- a/mercurial/exchange.py	Sat May 06 04:51:25 2017 +0530
+++ b/mercurial/exchange.py	Fri Feb 10 16:56:29 2017 -0800
@@ -43,7 +43,7 @@
                         }
 
 # Compression engines allowed in version 1. THIS SHOULD NEVER CHANGE.
-_bundlespecv1compengines = set(['gzip', 'bzip2', 'none'])
+_bundlespecv1compengines = {'gzip', 'bzip2', 'none'}
 
 def parsebundlespec(repo, spec, strict=True, externalnames=False):
     """Parse a bundle string specification into parts.
@@ -1522,7 +1522,7 @@
 
 def caps20to10(repo):
     """return a set with appropriate options to use bundle20 during getbundle"""
-    caps = set(['HG20'])
+    caps = {'HG20'}
     capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo))
     caps.add('bundle2=' + urlreq.quote(capsblob))
     return caps