D5520: simplestorerepo: migrate to in-hg CBOR code
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Jan 9 18:08:41 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGad51e6117095: simplestorerepo: migrate to in-hg CBOR code (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5520?vs=13067&id=13114
REVISION DETAIL
https://phab.mercurial-scm.org/D5520
AFFECTED FILES
tests/simplestorerepo.py
CHANGE DETAILS
diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -23,7 +23,6 @@
)
from mercurial.thirdparty import (
attr,
- cbor,
)
from mercurial import (
ancestor,
@@ -39,6 +38,7 @@
verify,
)
from mercurial.utils import (
+ cborutil,
interfaceutil,
storageutil,
)
@@ -106,7 +106,7 @@
indexdata = self._svfs.tryread(self._indexpath)
if indexdata:
- indexdata = cbor.loads(indexdata)
+ indexdata = cborutil.decodeall(indexdata)
self._indexdata = indexdata or []
self._indexbynode = {}
@@ -513,7 +513,8 @@
def _reflectindexupdate(self):
self._refreshindex()
- self._svfs.write(self._indexpath, cbor.dumps(self._indexdata))
+ self._svfs.write(self._indexpath,
+ ''.join(cborutil.streamencode(self._indexdata)))
def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None,
maybemissingparents=False):
To: durin42, indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list