Mercurial > public > mercurial-scm > hg
comparison mercurial/wireproto.py @ 29706:7f6130c7ffe1
wirepeer: rename confusing `source` parameter
It's named "url" everyplace else this method is defined, so let's be
consistent.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 05 Aug 2016 16:34:30 -0400 |
parents | 84c1a5942f1d |
children | bb04f96df51c |
comparison
equal
deleted
inserted
replaced
29705:41689e293994 | 29706:7f6130c7ffe1 |
---|---|
397 if any((cap.startswith('HG2') for cap in bundlecaps)): | 397 if any((cap.startswith('HG2') for cap in bundlecaps)): |
398 return bundle2.getunbundler(self.ui, f) | 398 return bundle2.getunbundler(self.ui, f) |
399 else: | 399 else: |
400 return changegroupmod.cg1unpacker(f, 'UN') | 400 return changegroupmod.cg1unpacker(f, 'UN') |
401 | 401 |
402 def unbundle(self, cg, heads, source): | 402 def unbundle(self, cg, heads, url): |
403 '''Send cg (a readable file-like object representing the | 403 '''Send cg (a readable file-like object representing the |
404 changegroup to push, typically a chunkbuffer object) to the | 404 changegroup to push, typically a chunkbuffer object) to the |
405 remote server as a bundle. | 405 remote server as a bundle. |
406 | 406 |
407 When pushing a bundle10 stream, return an integer indicating the | 407 When pushing a bundle10 stream, return an integer indicating the |
408 result of the push (see localrepository.addchangegroup()). | 408 result of the push (see localrepository.addchangegroup()). |
409 | 409 |
410 When pushing a bundle20 stream, return a bundle20 stream.''' | 410 When pushing a bundle20 stream, return a bundle20 stream. |
411 | |
412 `url` is the url the client thinks it's pushing to, which is | |
413 visible to hooks. | |
414 ''' | |
411 | 415 |
412 if heads != ['force'] and self.capable('unbundlehash'): | 416 if heads != ['force'] and self.capable('unbundlehash'): |
413 heads = encodelist(['hashed', | 417 heads = encodelist(['hashed', |
414 hashlib.sha1(''.join(sorted(heads))).digest()]) | 418 hashlib.sha1(''.join(sorted(heads))).digest()]) |
415 else: | 419 else: |