mercurial/utils/cborutil.py
changeset 43106 d783f945a701
parent 43077 687b865b95ad
child 43117 8ff1ecfadcd1
equal deleted inserted replaced
43105:649d3ac37a12 43106:d783f945a701
   174     Does not supporting indefinite length dictionaries.
   174     Does not supporting indefinite length dictionaries.
   175     """
   175     """
   176     yield encodelength(MAJOR_TYPE_MAP, len(d))
   176     yield encodelength(MAJOR_TYPE_MAP, len(d))
   177 
   177 
   178     for key, value in sorted(
   178     for key, value in sorted(
   179         d.iteritems(), key=lambda x: _mixedtypesortkey(x[0])
   179         pycompat.iteritems(d), key=lambda x: _mixedtypesortkey(x[0])
   180     ):
   180     ):
   181         for chunk in streamencode(key):
   181         for chunk in streamencode(key):
   182             yield chunk
   182             yield chunk
   183         for chunk in streamencode(value):
   183         for chunk in streamencode(value):
   184             yield chunk
   184             yield chunk