##// END OF EJS Templates
revlog: don't say "not found" on internal error...
Martin von Zweigbergk -
r38115:a9d9802d default
parent child Browse files
Show More
@@ -1151,9 +1151,9 b' static int index_find_node(indexObject *'
1151 1151 */
1152 1152 if (self->ntmisses++ < 4) {
1153 1153 for (rev = self->ntrev - 1; rev >= 0; rev--) {
1154 const char *n = index_node(self, rev);
1154 const char *n = index_node_existing(self, rev);
1155 1155 if (n == NULL)
1156 return -2;
1156 return -3;
1157 1157 if (memcmp(node, n, nodelen > 20 ? 20 : nodelen) == 0) {
1158 1158 if (nt_insert(self, n, rev) == -1)
1159 1159 return -3;
@@ -1162,11 +1162,9 b' static int index_find_node(indexObject *'
1162 1162 }
1163 1163 } else {
1164 1164 for (rev = self->ntrev - 1; rev >= 0; rev--) {
1165 const char *n = index_node(self, rev);
1166 if (n == NULL) {
1167 self->ntrev = rev + 1;
1168 return -2;
1169 }
1165 const char *n = index_node_existing(self, rev);
1166 if (n == NULL)
1167 return -3;
1170 1168 if (nt_insert(self, n, rev) == -1) {
1171 1169 self->ntrev = rev + 1;
1172 1170 return -3;
@@ -1243,9 +1241,9 b' static int nt_partialmatch(indexObject *'
1243 1241 if (self->ntrev > 0) {
1244 1242 /* ensure that the radix tree is fully populated */
1245 1243 for (rev = self->ntrev - 1; rev >= 0; rev--) {
1246 const char *n = index_node(self, rev);
1244 const char *n = index_node_existing(self, rev);
1247 1245 if (n == NULL)
1248 return -2;
1246 return -3;
1249 1247 if (nt_insert(self, n, rev) == -1)
1250 1248 return -3;
1251 1249 }
General Comments 0
You need to be logged in to leave comments. Login now