D4465: httppeer: use our CBOR decoder
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Sep 5 08:23:10 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcdb56f295b03: httppeer: use our CBOR decoder (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4465?vs=10762&id=10782
REVISION DETAIL
https://phab.mercurial-scm.org/D4465
AFFECTED FILES
mercurial/httppeer.py
CHANGE DETAILS
diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -16,9 +16,6 @@
import weakref
from .i18n import _
-from .thirdparty import (
- cbor,
-)
from . import (
bundle2,
error,
@@ -35,6 +32,7 @@
wireprotov2server,
)
from .utils import (
+ cborutil,
interfaceutil,
stringutil,
)
@@ -913,8 +911,8 @@
if advertisev2:
if ct == 'application/mercurial-cbor':
try:
- info = cbor.loads(rawdata)
- except cbor.CBORDecodeError:
+ info = cborutil.decodeall(rawdata)[0]
+ except cborutil.CBORDecodeError:
raise error.Abort(_('error decoding CBOR from remote server'),
hint=_('try again and consider contacting '
'the server operator'))
To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list