comparison mercurial/wireproto.py @ 36070:90ca4986616c

wireprotoserver: rename getfile() to forwardpayload() (API) "file" can mean a lot of things. Let's rename the interface method to something more descriptive. While I was here, I moved the docs about the payload format to the implementation of the SSH protocol, because it was lying about what the HTTP payload looked like. Differential Revision: https://phab.mercurial-scm.org/D2085
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 01 Feb 2018 17:12:07 -0800
parents 957e773614d0
children 038bcb759b75
comparison
equal deleted inserted replaced
36069:957e773614d0 36070:90ca4986616c
1006 # write bundle data to temporary file because it can be big 1006 # write bundle data to temporary file because it can be big
1007 fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-') 1007 fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-')
1008 fp = os.fdopen(fd, pycompat.sysstr('wb+')) 1008 fp = os.fdopen(fd, pycompat.sysstr('wb+'))
1009 r = 0 1009 r = 0
1010 try: 1010 try:
1011 proto.getfile(fp) 1011 proto.forwardpayload(fp)
1012 fp.seek(0) 1012 fp.seek(0)
1013 gen = exchange.readbundle(repo.ui, fp, None) 1013 gen = exchange.readbundle(repo.ui, fp, None)
1014 if (isinstance(gen, changegroupmod.cg1unpacker) 1014 if (isinstance(gen, changegroupmod.cg1unpacker)
1015 and not bundle1allowed(repo, 'push')): 1015 and not bundle1allowed(repo, 'push')):
1016 if proto.name == 'http': 1016 if proto.name == 'http':