diff mercurial/bundlerepo.py @ 45942:89a2afe31e82

formating: upgrade to black 20.8b1 This required a couple of small tweaks to un-confuse black, but now it works. Big formatting changes come from: * Dramatically improved collection-splitting logic upstream * Black having a strong (correct IMO) opinion that """ is better than ''' Differential Revision: https://phab.mercurial-scm.org/D9430
author Augie Fackler <raf@durin42.com>
date Fri, 27 Nov 2020 17:03:29 -0500
parents 88d5abec8f61
children 59fa3890d40a
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Fri Nov 27 17:00:00 2020 -0500
+++ b/mercurial/bundlerepo.py	Fri Nov 27 17:03:29 2020 -0500
@@ -328,8 +328,7 @@
         self._cgunpacker = changegroup.getunbundler(version, cgstream, b'UN')
 
     def _writetempbundle(self, readfn, suffix, header=b''):
-        """Write a temporary file to disk
-        """
+        """Write a temporary file to disk"""
         fdtemp, temp = self.vfs.mkstemp(prefix=b"hg-bundle-", suffix=suffix)
         self.tempfile = temp
 
@@ -530,7 +529,7 @@
 def getremotechanges(
     ui, repo, peer, onlyheads=None, bundlename=None, force=False
 ):
-    '''obtains a bundle of changes incoming from peer
+    """obtains a bundle of changes incoming from peer
 
     "onlyheads" restricts the returned changes to those reachable from the
       specified heads.
@@ -548,7 +547,7 @@
     "cleanupfn" must be called without arguments when you're done processing
       the changes; it closes both the original "peer" and the one returned
       here.
-    '''
+    """
     tmp = discovery.findcommonincoming(repo, peer, heads=onlyheads, force=force)
     common, incoming, rheads = tmp
     if not incoming:
@@ -611,7 +610,10 @@
                 with peer.commandexecutor() as e:
                     cg = e.callcommand(
                         b'changegroup',
-                        {b'nodes': incoming, b'source': b'incoming',},
+                        {
+                            b'nodes': incoming,
+                            b'source': b'incoming',
+                        },
                     ).result()
 
                 rheads = None
@@ -655,7 +657,10 @@
 
         with peer.commandexecutor() as e:
             remotephases = e.callcommand(
-                b'listkeys', {b'namespace': b'phases',}
+                b'listkeys',
+                {
+                    b'namespace': b'phases',
+                },
             ).result()
 
         pullop = exchange.pulloperation(bundlerepo, peer, heads=reponodes)