Fossil SCM

Further revisions to the semantics of printing the timeline 'bounds' indicators.

mistachkin 2013-11-11 23:22 trunk
Commit 8b03ef24891c139307074d8838420374dc8b6bf2
1 file changed +6 -6
+6 -6
--- src/timeline.c
+++ src/timeline.c
@@ -1521,19 +1521,19 @@
15211521
int nEntry = 0;
15221522
char zPrevDate[20];
15231523
const char *zCurrentUuid = 0;
15241524
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
15251525
Stmt fchngQuery; /* Query for file changes on check-ins */
1526
- int step;
1526
+ int rc;
15271527
15281528
zPrevDate[0] = 0;
15291529
if( g.localOpen ){
15301530
int rid = db_lget_int("checkout", 0);
15311531
zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
15321532
}
15331533
1534
- while( (step=db_step(q))==SQLITE_ROW ){
1534
+ while( (rc=db_step(q))==SQLITE_ROW ){
15351535
int rid = db_column_int(q, 0);
15361536
const char *zId = db_column_text(q, 1);
15371537
const char *zDate = db_column_text(q, 2);
15381538
const char *zCom = db_column_text(q, 3);
15391539
int nChild = db_column_int(q, 4);
@@ -1543,14 +1543,14 @@
15431543
char zPrefix[80];
15441544
char zUuid[UUID_SIZE+1];
15451545
15461546
if( nAbsLimit!=0 ){
15471547
if( nLimit<0 && nLine>=nAbsLimit ){
1548
- fossil_print("=== line limit (%d) reached ===\n", nAbsLimit);
1548
+ fossil_print("--- line limit (%d) reached ---\n", nAbsLimit);
15491549
break; /* line count limit hit, stop. */
15501550
}else if( nEntry>=nAbsLimit ){
1551
- fossil_print("=== entry limit (%d) reached ===\n", nAbsLimit);
1551
+ fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit);
15521552
break; /* entry count limit hit, stop. */
15531553
}
15541554
}
15551555
sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId);
15561556
if( memcmp(zDate, zPrevDate, 10) ){
@@ -1613,12 +1613,12 @@
16131613
}
16141614
db_reset(&fchngQuery);
16151615
}
16161616
nEntry++; /* record another complete entry */
16171617
}
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");
16201620
}
16211621
if( fchngQueryInit ) db_finalize(&fchngQuery);
16221622
}
16231623
16241624
/*
16251625
--- 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

Keyboard Shortcuts

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