Patchwork wirepeer: rename confusing `source` parameter

login
register
mail settings
Submitter Augie Fackler
Date Aug. 5, 2016, 8:46 p.m.
Message ID <6843a5a4e24c2f41108c.1470430012@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/16131/
State Accepted
Headers show

Comments

Augie Fackler - Aug. 5, 2016, 8:46 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1470429270 14400
#      Fri Aug 05 16:34:30 2016 -0400
# Node ID 6843a5a4e24c2f41108c0f055ae960b4cfefa0bb
# Parent  834b8ac4a7587562dccb527b28606ecf5532e883
wirepeer: rename confusing `source` parameter

It's named "url" everyplace else this method is defined, so let's be
consistent.

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -399,7 +399,7 @@  class wirepeer(peer.peerrepository):
         else:
             return changegroupmod.cg1unpacker(f, 'UN')
 
-    def unbundle(self, cg, heads, source):
+    def unbundle(self, cg, heads, url):
         '''Send cg (a readable file-like object representing the
         changegroup to push, typically a chunkbuffer object) to the
         remote server as a bundle.
@@ -407,7 +407,11 @@  class wirepeer(peer.peerrepository):
         When pushing a bundle10 stream, return an integer indicating the
         result of the push (see localrepository.addchangegroup()).
 
-        When pushing a bundle20 stream, return a bundle20 stream.'''
+        When pushing a bundle20 stream, return a bundle20 stream.
+
+        `url` is the url the client thinks it's pushing to, which is
+        visible to hooks.
+        '''
 
         if heads != ['force'] and self.capable('unbundlehash'):
             heads = encodelist(['hashed',