Show More
@@ -382,12 +382,12 b' static PyObject *pack_dirstate(PyObject ' | |||
|
382 | 382 | char *p, *s; |
|
383 | 383 | int now; |
|
384 | 384 | |
|
385 | if (!PyArg_ParseTuple(args, "O!O!Oi:pack_dirstate", &PyDict_Type, &map, | |
|
386 | &PyDict_Type, ©map, &pl, &now)) | |
|
385 | if (!PyArg_ParseTuple(args, "O!O!O!i:pack_dirstate", &PyDict_Type, &map, | |
|
386 | &PyDict_Type, ©map, &PyTuple_Type, &pl, &now)) | |
|
387 | 387 | return NULL; |
|
388 | 388 | |
|
389 |
if ( |
|
|
390 |
PyErr_SetString(PyExc_TypeError, "expected 2-element |
|
|
389 | if (PyTuple_Size(pl) != 2) { | |
|
390 | PyErr_SetString(PyExc_TypeError, "expected 2-element tuple"); | |
|
391 | 391 | return NULL; |
|
392 | 392 | } |
|
393 | 393 | |
@@ -416,14 +416,14 b' static PyObject *pack_dirstate(PyObject ' | |||
|
416 | 416 | |
|
417 | 417 | p = PyBytes_AS_STRING(packobj); |
|
418 | 418 | |
|
419 |
pn = Py |
|
|
419 | pn = PyTuple_GET_ITEM(pl, 0); | |
|
420 | 420 | if (PyBytes_AsStringAndSize(pn, &s, &l) == -1 || l != 20) { |
|
421 | 421 | PyErr_SetString(PyExc_TypeError, "expected a 20-byte hash"); |
|
422 | 422 | goto bail; |
|
423 | 423 | } |
|
424 | 424 | memcpy(p, s, l); |
|
425 | 425 | p += 20; |
|
426 |
pn = Py |
|
|
426 | pn = PyTuple_GET_ITEM(pl, 1); | |
|
427 | 427 | if (PyBytes_AsStringAndSize(pn, &s, &l) == -1 || l != 20) { |
|
428 | 428 | PyErr_SetString(PyExc_TypeError, "expected a 20-byte hash"); |
|
429 | 429 | goto bail; |
@@ -713,7 +713,7 b' void dirs_module_init(PyObject *mod);' | |||
|
713 | 713 | void manifest_module_init(PyObject *mod); |
|
714 | 714 | void revlog_module_init(PyObject *mod); |
|
715 | 715 | |
|
716 |
static const int version = |
|
|
716 | static const int version = 10; | |
|
717 | 717 | |
|
718 | 718 | static void module_init(PyObject *mod) |
|
719 | 719 | { |
@@ -1392,9 +1392,9 b' class dirstatemap(object):' | |||
|
1392 | 1392 | |
|
1393 | 1393 | l = len(st) |
|
1394 | 1394 | if l == 40: |
|
1395 | self._parents = st[:20], st[20:40] | |
|
1395 | self._parents = (st[:20], st[20:40]) | |
|
1396 | 1396 | elif l == 0: |
|
1397 |
self._parents = |
|
|
1397 | self._parents = (nullid, nullid) | |
|
1398 | 1398 | else: |
|
1399 | 1399 | raise error.Abort(_('working directory state appears ' |
|
1400 | 1400 | 'damaged!')) |
General Comments 0
You need to be logged in to leave comments.
Login now