Fossil SCM
Show the "remote list" values on the /urllist page.
Commit
964ec660a26529ff989c6af0917edf3f5a655a4cfb1f5aa4aaf5f467b6354421
Parent
75583074336e007…
1 file changed
+29
-1
+29
-1
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -588,11 +588,11 @@ | ||
| 588 | 588 | ); |
| 589 | 589 | while( db_step(&q)==SQLITE_ROW ){ |
| 590 | 590 | const char *zURL = db_column_text(&q,0); |
| 591 | 591 | UrlData x; |
| 592 | 592 | if( cnt==0 ){ |
| 593 | - @ <div class="section">Sync with these URLs</div> | |
| 593 | + @ <div class="section">Recently synced with these URLs</div> | |
| 594 | 594 | @ <table border='0' width='100%%'> |
| 595 | 595 | } |
| 596 | 596 | memset(&x, 0, sizeof(x)); |
| 597 | 597 | url_parse_local(zURL, URL_OMIT_USER, &x); |
| 598 | 598 | @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a> |
| @@ -640,10 +640,38 @@ | ||
| 640 | 640 | }else{ |
| 641 | 641 | @ <td> </td> |
| 642 | 642 | } |
| 643 | 643 | @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr> |
| 644 | 644 | } |
| 645 | + db_finalize(&q); | |
| 646 | + fossil_free(zPriorRepo); | |
| 647 | + if( cnt ){ | |
| 648 | + @ </table> | |
| 649 | + total += cnt; | |
| 650 | + } | |
| 651 | + | |
| 652 | + cnt = 0; | |
| 653 | + db_prepare(&q, | |
| 654 | + "SELECT" | |
| 655 | + " value," | |
| 656 | + " substr(name,10)," | |
| 657 | + " datetime(mtime,'unixepoch')" | |
| 658 | + "FROM config\n" | |
| 659 | + "WHERE name GLOB 'sync-url:*'\n" | |
| 660 | + "ORDER BY 2" | |
| 661 | + ); | |
| 662 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 663 | + const char *zUrl = db_column_text(&q, 0); | |
| 664 | + const char *zName = db_column_text(&q, 1); | |
| 665 | + if( cnt++==0 ){ | |
| 666 | + @ <div class="section">Defined sync targets</div> | |
| 667 | + @ <table border='0' width='100%%'> | |
| 668 | + } | |
| 669 | + @ <tr><td>%h(zName)</td><td> </td> | |
| 670 | + @ <td width='95%%'><a href='%h(zUrl)'>%h(zUrl)</a></td> | |
| 671 | + @ <td><nobr>%h(db_column_text(&q,2))</nobr></td></tr> | |
| 672 | + } | |
| 645 | 673 | db_finalize(&q); |
| 646 | 674 | fossil_free(zPriorRepo); |
| 647 | 675 | if( cnt ){ |
| 648 | 676 | @ </table> |
| 649 | 677 | total += cnt; |
| 650 | 678 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -588,11 +588,11 @@ | |
| 588 | ); |
| 589 | while( db_step(&q)==SQLITE_ROW ){ |
| 590 | const char *zURL = db_column_text(&q,0); |
| 591 | UrlData x; |
| 592 | if( cnt==0 ){ |
| 593 | @ <div class="section">Sync with these URLs</div> |
| 594 | @ <table border='0' width='100%%'> |
| 595 | } |
| 596 | memset(&x, 0, sizeof(x)); |
| 597 | url_parse_local(zURL, URL_OMIT_USER, &x); |
| 598 | @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a> |
| @@ -640,10 +640,38 @@ | |
| 640 | }else{ |
| 641 | @ <td> </td> |
| 642 | } |
| 643 | @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr> |
| 644 | } |
| 645 | db_finalize(&q); |
| 646 | fossil_free(zPriorRepo); |
| 647 | if( cnt ){ |
| 648 | @ </table> |
| 649 | total += cnt; |
| 650 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -588,11 +588,11 @@ | |
| 588 | ); |
| 589 | while( db_step(&q)==SQLITE_ROW ){ |
| 590 | const char *zURL = db_column_text(&q,0); |
| 591 | UrlData x; |
| 592 | if( cnt==0 ){ |
| 593 | @ <div class="section">Recently synced with these URLs</div> |
| 594 | @ <table border='0' width='100%%'> |
| 595 | } |
| 596 | memset(&x, 0, sizeof(x)); |
| 597 | url_parse_local(zURL, URL_OMIT_USER, &x); |
| 598 | @ <tr><td width='100%%'><a href='%h(x.canonical)'>%h(x.canonical)</a> |
| @@ -640,10 +640,38 @@ | |
| 640 | }else{ |
| 641 | @ <td> </td> |
| 642 | } |
| 643 | @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr> |
| 644 | } |
| 645 | db_finalize(&q); |
| 646 | fossil_free(zPriorRepo); |
| 647 | if( cnt ){ |
| 648 | @ </table> |
| 649 | total += cnt; |
| 650 | } |
| 651 | |
| 652 | cnt = 0; |
| 653 | db_prepare(&q, |
| 654 | "SELECT" |
| 655 | " value," |
| 656 | " substr(name,10)," |
| 657 | " datetime(mtime,'unixepoch')" |
| 658 | "FROM config\n" |
| 659 | "WHERE name GLOB 'sync-url:*'\n" |
| 660 | "ORDER BY 2" |
| 661 | ); |
| 662 | while( db_step(&q)==SQLITE_ROW ){ |
| 663 | const char *zUrl = db_column_text(&q, 0); |
| 664 | const char *zName = db_column_text(&q, 1); |
| 665 | if( cnt++==0 ){ |
| 666 | @ <div class="section">Defined sync targets</div> |
| 667 | @ <table border='0' width='100%%'> |
| 668 | } |
| 669 | @ <tr><td>%h(zName)</td><td> </td> |
| 670 | @ <td width='95%%'><a href='%h(zUrl)'>%h(zUrl)</a></td> |
| 671 | @ <td><nobr>%h(db_column_text(&q,2))</nobr></td></tr> |
| 672 | } |
| 673 | db_finalize(&q); |
| 674 | fossil_free(zPriorRepo); |
| 675 | if( cnt ){ |
| 676 | @ </table> |
| 677 | total += cnt; |
| 678 |