equal
deleted
inserted
replaced
66 The header is followed by the markers. Marker format depend of the version. See |
66 The header is followed by the markers. Marker format depend of the version. See |
67 comment associated with each format for details. |
67 comment associated with each format for details. |
68 |
68 |
69 """ |
69 """ |
70 |
70 |
|
71 import binascii |
71 import errno |
72 import errno |
72 import struct |
73 import struct |
73 |
74 |
74 from .i18n import _ |
75 from .i18n import _ |
75 from .pycompat import getattr |
76 from .pycompat import getattr |
242 # if parent content is not a nodeid, drop the data |
243 # if parent content is not a nodeid, drop the data |
243 for p in parents: |
244 for p in parents: |
244 if len(p) != 20: |
245 if len(p) != 20: |
245 parents = None |
246 parents = None |
246 break |
247 break |
247 except TypeError: |
248 except binascii.Error: |
248 # if content cannot be translated to nodeid drop the data. |
249 # if content cannot be translated to nodeid drop the data. |
249 parents = None |
250 parents = None |
250 |
251 |
251 metadata = tuple(sorted(metadata.items())) |
252 metadata = tuple(sorted(metadata.items())) |
252 |
253 |