Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG2d513ab7ce94: httppeer: use %d to format int
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/httppeer.py (2 lines) |
varyheaders.append(header) | varyheaders.append(header) | ||||
if varyheaders: | if varyheaders: | ||||
headers[r'Vary'] = r','.join(varyheaders) | headers[r'Vary'] = r','.join(varyheaders) | ||||
req = self._requestbuilder(pycompat.strurl(cu), data, headers) | req = self._requestbuilder(pycompat.strurl(cu), data, headers) | ||||
if data is not None: | if data is not None: | ||||
self.ui.debug("sending %s bytes\n" % size) | self.ui.debug("sending %d bytes\n" % size) | ||||
req.add_unredirected_header('Content-Length', '%d' % size) | req.add_unredirected_header('Content-Length', '%d' % size) | ||||
try: | try: | ||||
resp = self._openurl(req) | resp = self._openurl(req) | ||||
except urlerr.httperror as inst: | except urlerr.httperror as inst: | ||||
if inst.code == 401: | if inst.code == 401: | ||||
raise error.Abort(_('authorization failed')) | raise error.Abort(_('authorization failed')) | ||||
raise | raise | ||||
except httplib.HTTPException as inst: | except httplib.HTTPException as inst: |