mercurial/parsers.c
branchstable
changeset 18504 d1d5fdcc2d46
parent 18430 0459c6555f69
child 18567 194e63c1ccb9
--- a/mercurial/parsers.c	Wed Jan 30 17:32:17 2013 +0100
+++ b/mercurial/parsers.c	Mon Jan 28 19:05:35 2013 +0900
@@ -1234,8 +1234,14 @@
 				self->ntrev = (int)start;
 		}
 		self->length = start + 1;
-		if (start < self->raw_length)
+		if (start < self->raw_length) {
+			if (self->cache) {
+				Py_ssize_t i;
+				for (i = start; i < self->raw_length; i++)
+					Py_CLEAR(self->cache[i]);
+			}
 			self->raw_length = start;
+		}
 		goto done;
 	}