D231: httppeer: add support for httppostargs when we're sending a file
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Mon Aug 21 13:21:15 UTC 2017
yuja added inline comments.
INLINE COMMENTS
> httppeer.py:105
> + def read(self, amt=None):
> + if amt <= 0:
> + return ''.join(f.read() for f in self._fileobjs)
Just nits:
- `read(0)` should return an empty string.
- `None <= 0` is TypeError on Python 3.
> httppeer.py:223
> + argsio.length = len(strargs)
> + data = _multifile(argsio, data)
> + headers['X-HgArgs-Post'] = len(strargs)
Does this mean `data` must have `length` attribute if it isn't
a string? A plain file object has no such attribute.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D231
To: durin42, #hg-reviewers, martinvonz
Cc: yuja, martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list