Mercurial > hg
comparison mercurial/cext/revlog.c @ 43532:53581e220ba3
revlog: clean up the node of all revision stripped in the C code
For some obscure reason, the loop cleaning up node was skipping the first
element… I cannot see a reason for it. The overall code is running fine
nevertheless because the node are also explicitly deleted from python.
We want to delete this explicit deletion, so we need to fix that code first.
This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D7320
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 08 Nov 2019 10:01:10 +0100 |
parents | 509a0477b3a6 |
children | 0c659fc20207 |
comparison
equal
deleted
inserted
replaced
43531:dcf9826c8d8c | 43532:53581e220ba3 |
---|---|
2487 | 2487 |
2488 if (start < self->length) { | 2488 if (start < self->length) { |
2489 if (self->ntinitialized) { | 2489 if (self->ntinitialized) { |
2490 Py_ssize_t i; | 2490 Py_ssize_t i; |
2491 | 2491 |
2492 for (i = start + 1; i < self->length; i++) { | 2492 for (i = start; i < self->length; i++) { |
2493 const char *node = index_node_existing(self, i); | 2493 const char *node = index_node_existing(self, i); |
2494 if (node == NULL) | 2494 if (node == NULL) |
2495 return -1; | 2495 return -1; |
2496 | 2496 |
2497 nt_delete_node(&self->nt, node); | 2497 nt_delete_node(&self->nt, node); |