Fossil SCM
New information about the git export shown by "fossil git status".
Commit
a0a5be0e976c77cbcf86db31aaad4c3d797794f92b15e12f18ac6a68921f6bce
Parent
84949f51c801a3c…
1 file changed
+15
+15
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -1528,10 +1528,11 @@ | ||
| 1528 | 1528 | ** Show the status of a "git export". |
| 1529 | 1529 | */ |
| 1530 | 1530 | void gitmirror_status_command(void){ |
| 1531 | 1531 | char *zMirror; |
| 1532 | 1532 | char *z; |
| 1533 | + int n, k; | |
| 1533 | 1534 | db_find_and_open_repository(0, 0); |
| 1534 | 1535 | verify_all_options(); |
| 1535 | 1536 | zMirror = db_get("last-git-export-repo", 0); |
| 1536 | 1537 | if( zMirror==0 ){ |
| 1537 | 1538 | fossil_print("Git mirror: none\n"); |
| @@ -1549,10 +1550,24 @@ | ||
| 1549 | 1550 | }else{ |
| 1550 | 1551 | UrlData url; |
| 1551 | 1552 | url_parse_local(z, 0, &url); |
| 1552 | 1553 | fossil_print("Autopush: %s\n", url.canonical); |
| 1553 | 1554 | } |
| 1555 | + n = db_int(0, | |
| 1556 | + "SELECT count(*) FROM event" | |
| 1557 | + " WHERE type='ci'" | |
| 1558 | + " AND mtime>coalesce((SELECT value FROM mconfig" | |
| 1559 | + " WHERE key='start'),0.0)" | |
| 1560 | + ); | |
| 1561 | + if( n==0 ){ | |
| 1562 | + fossil_print("Status: up-to-date\n"); | |
| 1563 | + }else{ | |
| 1564 | + fossil_print("Status: %d check-ins awaiting export\n", n); | |
| 1565 | + } | |
| 1566 | + n = db_int(0, "SELECT count(*) FROM mmark WHERE isfile"); | |
| 1567 | + k = db_int(0, "SELECT count(*) FROm mmark WHERE NOT isfile"); | |
| 1568 | + fossil_print("Exported: %d check-ins and %d file blobs\n", k, n); | |
| 1554 | 1569 | } |
| 1555 | 1570 | |
| 1556 | 1571 | /* |
| 1557 | 1572 | ** COMMAND: git |
| 1558 | 1573 | ** |
| 1559 | 1574 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1528,10 +1528,11 @@ | |
| 1528 | ** Show the status of a "git export". |
| 1529 | */ |
| 1530 | void gitmirror_status_command(void){ |
| 1531 | char *zMirror; |
| 1532 | char *z; |
| 1533 | db_find_and_open_repository(0, 0); |
| 1534 | verify_all_options(); |
| 1535 | zMirror = db_get("last-git-export-repo", 0); |
| 1536 | if( zMirror==0 ){ |
| 1537 | fossil_print("Git mirror: none\n"); |
| @@ -1549,10 +1550,24 @@ | |
| 1549 | }else{ |
| 1550 | UrlData url; |
| 1551 | url_parse_local(z, 0, &url); |
| 1552 | fossil_print("Autopush: %s\n", url.canonical); |
| 1553 | } |
| 1554 | } |
| 1555 | |
| 1556 | /* |
| 1557 | ** COMMAND: git |
| 1558 | ** |
| 1559 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -1528,10 +1528,11 @@ | |
| 1528 | ** Show the status of a "git export". |
| 1529 | */ |
| 1530 | void gitmirror_status_command(void){ |
| 1531 | char *zMirror; |
| 1532 | char *z; |
| 1533 | int n, k; |
| 1534 | db_find_and_open_repository(0, 0); |
| 1535 | verify_all_options(); |
| 1536 | zMirror = db_get("last-git-export-repo", 0); |
| 1537 | if( zMirror==0 ){ |
| 1538 | fossil_print("Git mirror: none\n"); |
| @@ -1549,10 +1550,24 @@ | |
| 1550 | }else{ |
| 1551 | UrlData url; |
| 1552 | url_parse_local(z, 0, &url); |
| 1553 | fossil_print("Autopush: %s\n", url.canonical); |
| 1554 | } |
| 1555 | n = db_int(0, |
| 1556 | "SELECT count(*) FROM event" |
| 1557 | " WHERE type='ci'" |
| 1558 | " AND mtime>coalesce((SELECT value FROM mconfig" |
| 1559 | " WHERE key='start'),0.0)" |
| 1560 | ); |
| 1561 | if( n==0 ){ |
| 1562 | fossil_print("Status: up-to-date\n"); |
| 1563 | }else{ |
| 1564 | fossil_print("Status: %d check-ins awaiting export\n", n); |
| 1565 | } |
| 1566 | n = db_int(0, "SELECT count(*) FROM mmark WHERE isfile"); |
| 1567 | k = db_int(0, "SELECT count(*) FROm mmark WHERE NOT isfile"); |
| 1568 | fossil_print("Exported: %d check-ins and %d file blobs\n", k, n); |
| 1569 | } |
| 1570 | |
| 1571 | /* |
| 1572 | ** COMMAND: git |
| 1573 | ** |
| 1574 |