Fossil SCM
Perform timeline limit checks at the end of the loop, after checking if a limit exists.
Commit
521f7a14e024997989a87cd75660c28d9cb10304
Parent
d54ada1cead3fb1…
1 file changed
+7
-7
+7
-7
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1540,17 +1540,10 @@ | ||
| 1540 | 1540 | char *zFree = 0; |
| 1541 | 1541 | int n = 0; |
| 1542 | 1542 | char zPrefix[80]; |
| 1543 | 1543 | char zUuid[UUID_SIZE+1]; |
| 1544 | 1544 | |
| 1545 | - if( nLimit<0 && nLine>=nAbsLimit ){ | |
| 1546 | - fossil_print("=== line limit reached ===\n"); | |
| 1547 | - break; /* line count limit hit, stop. */ | |
| 1548 | - }else if( nEntry>=nAbsLimit ){ | |
| 1549 | - fossil_print("=== entry limit reached ===\n"); | |
| 1550 | - break; /* entry count limit hit, stop. */ | |
| 1551 | - } | |
| 1552 | 1545 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1553 | 1546 | if( memcmp(zDate, zPrevDate, 10) ){ |
| 1554 | 1547 | fossil_print("=== %.10s ===\n", zDate); |
| 1555 | 1548 | memcpy(zPrevDate, zDate, 10); |
| 1556 | 1549 | nLine++; /* record another line */ |
| @@ -1610,10 +1603,17 @@ | ||
| 1610 | 1603 | } |
| 1611 | 1604 | db_reset(&fchngQuery); |
| 1612 | 1605 | } |
| 1613 | 1606 | nEntry++; /* record another complete entry */ |
| 1614 | 1607 | if( !nAbsLimit ) continue; /* no limit, continue */ |
| 1608 | + if( nLimit<0 && nLine>=nAbsLimit ){ | |
| 1609 | + fossil_print("=== line limit reached ===\n"); | |
| 1610 | + break; /* line count limit hit, stop. */ | |
| 1611 | + }else if( nEntry>=nAbsLimit ){ | |
| 1612 | + fossil_print("=== entry limit reached ===\n"); | |
| 1613 | + break; /* entry count limit hit, stop. */ | |
| 1614 | + } | |
| 1615 | 1615 | } |
| 1616 | 1616 | if( fchngQueryInit ) db_finalize(&fchngQuery); |
| 1617 | 1617 | } |
| 1618 | 1618 | |
| 1619 | 1619 | /* |
| 1620 | 1620 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1540,17 +1540,10 @@ | |
| 1540 | char *zFree = 0; |
| 1541 | int n = 0; |
| 1542 | char zPrefix[80]; |
| 1543 | char zUuid[UUID_SIZE+1]; |
| 1544 | |
| 1545 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1546 | fossil_print("=== line limit reached ===\n"); |
| 1547 | break; /* line count limit hit, stop. */ |
| 1548 | }else if( nEntry>=nAbsLimit ){ |
| 1549 | fossil_print("=== entry limit reached ===\n"); |
| 1550 | break; /* entry count limit hit, stop. */ |
| 1551 | } |
| 1552 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1553 | if( memcmp(zDate, zPrevDate, 10) ){ |
| 1554 | fossil_print("=== %.10s ===\n", zDate); |
| 1555 | memcpy(zPrevDate, zDate, 10); |
| 1556 | nLine++; /* record another line */ |
| @@ -1610,10 +1603,17 @@ | |
| 1610 | } |
| 1611 | db_reset(&fchngQuery); |
| 1612 | } |
| 1613 | nEntry++; /* record another complete entry */ |
| 1614 | if( !nAbsLimit ) continue; /* no limit, continue */ |
| 1615 | } |
| 1616 | if( fchngQueryInit ) db_finalize(&fchngQuery); |
| 1617 | } |
| 1618 | |
| 1619 | /* |
| 1620 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1540,17 +1540,10 @@ | |
| 1540 | char *zFree = 0; |
| 1541 | int n = 0; |
| 1542 | char zPrefix[80]; |
| 1543 | char zUuid[UUID_SIZE+1]; |
| 1544 | |
| 1545 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1546 | if( memcmp(zDate, zPrevDate, 10) ){ |
| 1547 | fossil_print("=== %.10s ===\n", zDate); |
| 1548 | memcpy(zPrevDate, zDate, 10); |
| 1549 | nLine++; /* record another line */ |
| @@ -1610,10 +1603,17 @@ | |
| 1603 | } |
| 1604 | db_reset(&fchngQuery); |
| 1605 | } |
| 1606 | nEntry++; /* record another complete entry */ |
| 1607 | if( !nAbsLimit ) continue; /* no limit, continue */ |
| 1608 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1609 | fossil_print("=== line limit reached ===\n"); |
| 1610 | break; /* line count limit hit, stop. */ |
| 1611 | }else if( nEntry>=nAbsLimit ){ |
| 1612 | fossil_print("=== entry limit reached ===\n"); |
| 1613 | break; /* entry count limit hit, stop. */ |
| 1614 | } |
| 1615 | } |
| 1616 | if( fchngQueryInit ) db_finalize(&fchngQuery); |
| 1617 | } |
| 1618 | |
| 1619 | /* |
| 1620 |