Fossil SCM

Perform timeline limit checks at the end of the loop, after checking if a limit exists.

mistachkin 2013-10-22 03:40 UTC timeline_cmd_dash_n_fix
Commit 521f7a14e024997989a87cd75660c28d9cb10304
1 file changed +7 -7
+7 -7
--- src/timeline.c
+++ src/timeline.c
@@ -1540,17 +1540,10 @@
15401540
char *zFree = 0;
15411541
int n = 0;
15421542
char zPrefix[80];
15431543
char zUuid[UUID_SIZE+1];
15441544
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
- }
15521545
sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId);
15531546
if( memcmp(zDate, zPrevDate, 10) ){
15541547
fossil_print("=== %.10s ===\n", zDate);
15551548
memcpy(zPrevDate, zDate, 10);
15561549
nLine++; /* record another line */
@@ -1610,10 +1603,17 @@
16101603
}
16111604
db_reset(&fchngQuery);
16121605
}
16131606
nEntry++; /* record another complete entry */
16141607
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
+ }
16151615
}
16161616
if( fchngQueryInit ) db_finalize(&fchngQuery);
16171617
}
16181618
16191619
/*
16201620
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button