Fossil SCM
Further revisions to the semantics of printing the timeline 'bounds' indicators.
Commit
8b03ef24891c139307074d8838420374dc8b6bf2
Parent
c0242ad4d8d240c…
1 file changed
+6
-6
+6
-6
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1521,19 +1521,19 @@ | ||
| 1521 | 1521 | int nEntry = 0; |
| 1522 | 1522 | char zPrevDate[20]; |
| 1523 | 1523 | const char *zCurrentUuid = 0; |
| 1524 | 1524 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1525 | 1525 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 1526 | - int step; | |
| 1526 | + int rc; | |
| 1527 | 1527 | |
| 1528 | 1528 | zPrevDate[0] = 0; |
| 1529 | 1529 | if( g.localOpen ){ |
| 1530 | 1530 | int rid = db_lget_int("checkout", 0); |
| 1531 | 1531 | zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1532 | 1532 | } |
| 1533 | 1533 | |
| 1534 | - while( (step=db_step(q))==SQLITE_ROW ){ | |
| 1534 | + while( (rc=db_step(q))==SQLITE_ROW ){ | |
| 1535 | 1535 | int rid = db_column_int(q, 0); |
| 1536 | 1536 | const char *zId = db_column_text(q, 1); |
| 1537 | 1537 | const char *zDate = db_column_text(q, 2); |
| 1538 | 1538 | const char *zCom = db_column_text(q, 3); |
| 1539 | 1539 | int nChild = db_column_int(q, 4); |
| @@ -1543,14 +1543,14 @@ | ||
| 1543 | 1543 | char zPrefix[80]; |
| 1544 | 1544 | char zUuid[UUID_SIZE+1]; |
| 1545 | 1545 | |
| 1546 | 1546 | if( nAbsLimit!=0 ){ |
| 1547 | 1547 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1548 | - fossil_print("=== line limit (%d) reached ===\n", nAbsLimit); | |
| 1548 | + fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); | |
| 1549 | 1549 | break; /* line count limit hit, stop. */ |
| 1550 | 1550 | }else if( nEntry>=nAbsLimit ){ |
| 1551 | - fossil_print("=== entry limit (%d) reached ===\n", nAbsLimit); | |
| 1551 | + fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); | |
| 1552 | 1552 | break; /* entry count limit hit, stop. */ |
| 1553 | 1553 | } |
| 1554 | 1554 | } |
| 1555 | 1555 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1556 | 1556 | if( memcmp(zDate, zPrevDate, 10) ){ |
| @@ -1613,12 +1613,12 @@ | ||
| 1613 | 1613 | } |
| 1614 | 1614 | db_reset(&fchngQuery); |
| 1615 | 1615 | } |
| 1616 | 1616 | nEntry++; /* record another complete entry */ |
| 1617 | 1617 | } |
| 1618 | - if( (nAbsLimit!=0) && (step!=SQLITE_ROW) ){ | |
| 1619 | - fossil_print("+++ end of timeline reached +++\n"); | |
| 1618 | + if( rc==SQLITE_DONE ){ | |
| 1619 | + fossil_print("+++ end of timeline +++\n"); | |
| 1620 | 1620 | } |
| 1621 | 1621 | if( fchngQueryInit ) db_finalize(&fchngQuery); |
| 1622 | 1622 | } |
| 1623 | 1623 | |
| 1624 | 1624 | /* |
| 1625 | 1625 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1521,19 +1521,19 @@ | |
| 1521 | int nEntry = 0; |
| 1522 | char zPrevDate[20]; |
| 1523 | const char *zCurrentUuid = 0; |
| 1524 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1525 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 1526 | int step; |
| 1527 | |
| 1528 | zPrevDate[0] = 0; |
| 1529 | if( g.localOpen ){ |
| 1530 | int rid = db_lget_int("checkout", 0); |
| 1531 | zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1532 | } |
| 1533 | |
| 1534 | while( (step=db_step(q))==SQLITE_ROW ){ |
| 1535 | int rid = db_column_int(q, 0); |
| 1536 | const char *zId = db_column_text(q, 1); |
| 1537 | const char *zDate = db_column_text(q, 2); |
| 1538 | const char *zCom = db_column_text(q, 3); |
| 1539 | int nChild = db_column_int(q, 4); |
| @@ -1543,14 +1543,14 @@ | |
| 1543 | char zPrefix[80]; |
| 1544 | char zUuid[UUID_SIZE+1]; |
| 1545 | |
| 1546 | if( nAbsLimit!=0 ){ |
| 1547 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1548 | fossil_print("=== line limit (%d) reached ===\n", nAbsLimit); |
| 1549 | break; /* line count limit hit, stop. */ |
| 1550 | }else if( nEntry>=nAbsLimit ){ |
| 1551 | fossil_print("=== entry limit (%d) reached ===\n", nAbsLimit); |
| 1552 | break; /* entry count limit hit, stop. */ |
| 1553 | } |
| 1554 | } |
| 1555 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1556 | if( memcmp(zDate, zPrevDate, 10) ){ |
| @@ -1613,12 +1613,12 @@ | |
| 1613 | } |
| 1614 | db_reset(&fchngQuery); |
| 1615 | } |
| 1616 | nEntry++; /* record another complete entry */ |
| 1617 | } |
| 1618 | if( (nAbsLimit!=0) && (step!=SQLITE_ROW) ){ |
| 1619 | fossil_print("+++ end of timeline reached +++\n"); |
| 1620 | } |
| 1621 | if( fchngQueryInit ) db_finalize(&fchngQuery); |
| 1622 | } |
| 1623 | |
| 1624 | /* |
| 1625 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1521,19 +1521,19 @@ | |
| 1521 | int nEntry = 0; |
| 1522 | char zPrevDate[20]; |
| 1523 | const char *zCurrentUuid = 0; |
| 1524 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 1525 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 1526 | int rc; |
| 1527 | |
| 1528 | zPrevDate[0] = 0; |
| 1529 | if( g.localOpen ){ |
| 1530 | int rid = db_lget_int("checkout", 0); |
| 1531 | zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 1532 | } |
| 1533 | |
| 1534 | while( (rc=db_step(q))==SQLITE_ROW ){ |
| 1535 | int rid = db_column_int(q, 0); |
| 1536 | const char *zId = db_column_text(q, 1); |
| 1537 | const char *zDate = db_column_text(q, 2); |
| 1538 | const char *zCom = db_column_text(q, 3); |
| 1539 | int nChild = db_column_int(q, 4); |
| @@ -1543,14 +1543,14 @@ | |
| 1543 | char zPrefix[80]; |
| 1544 | char zUuid[UUID_SIZE+1]; |
| 1545 | |
| 1546 | if( nAbsLimit!=0 ){ |
| 1547 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1548 | fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); |
| 1549 | break; /* line count limit hit, stop. */ |
| 1550 | }else if( nEntry>=nAbsLimit ){ |
| 1551 | fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); |
| 1552 | break; /* entry count limit hit, stop. */ |
| 1553 | } |
| 1554 | } |
| 1555 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1556 | if( memcmp(zDate, zPrevDate, 10) ){ |
| @@ -1613,12 +1613,12 @@ | |
| 1613 | } |
| 1614 | db_reset(&fchngQuery); |
| 1615 | } |
| 1616 | nEntry++; /* record another complete entry */ |
| 1617 | } |
| 1618 | if( rc==SQLITE_DONE ){ |
| 1619 | fossil_print("+++ end of timeline +++\n"); |
| 1620 | } |
| 1621 | if( fchngQueryInit ) db_finalize(&fchngQuery); |
| 1622 | } |
| 1623 | |
| 1624 | /* |
| 1625 |