Fossil SCM
Somewhat simpler SELECT expression which works with older SQLite versions as well (and gives exactly the same output). Typo.
Commit
c5588966c099011244519a9920da69135bb20198
Parent
3c6f20370a580d8…
2 files changed
+1
-1
+3
-3
+1
-1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -131,11 +131,11 @@ | ||
| 131 | 131 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 132 | 132 | ** option is supported. |
| 133 | 133 | ** |
| 134 | 134 | ** setting Run the "setting", "set", or "unset" commands on all |
| 135 | 135 | ** set repositories. These command are particularly useful in |
| 136 | -** unset conjunection with the "max-loadavg" setting which cannot | |
| 136 | +** unset conjunction with the "max-loadavg" setting which cannot | |
| 137 | 137 | ** otherwise be set globally. |
| 138 | 138 | ** |
| 139 | 139 | ** Repositories are automatically added to the set of known repositories |
| 140 | 140 | ** when one of the following commands are run against the repository: |
| 141 | 141 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 142 | 142 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -131,11 +131,11 @@ | |
| 131 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 132 | ** option is supported. |
| 133 | ** |
| 134 | ** setting Run the "setting", "set", or "unset" commands on all |
| 135 | ** set repositories. These command are particularly useful in |
| 136 | ** unset conjunection with the "max-loadavg" setting which cannot |
| 137 | ** otherwise be set globally. |
| 138 | ** |
| 139 | ** Repositories are automatically added to the set of known repositories |
| 140 | ** when one of the following commands are run against the repository: |
| 141 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 142 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -131,11 +131,11 @@ | |
| 131 | ** sync Run a "sync" on all repositories. Only the --verbose |
| 132 | ** option is supported. |
| 133 | ** |
| 134 | ** setting Run the "setting", "set", or "unset" commands on all |
| 135 | ** set repositories. These command are particularly useful in |
| 136 | ** unset conjunction with the "max-loadavg" setting which cannot |
| 137 | ** otherwise be set globally. |
| 138 | ** |
| 139 | ** Repositories are automatically added to the set of known repositories |
| 140 | ** when one of the following commands are run against the repository: |
| 141 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 142 |
+3
-3
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -235,13 +235,13 @@ | ||
| 235 | 235 | fossil_print("%*s%d (%d changes)\n", colWidth, "tickets:", n, m); |
| 236 | 236 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='e'"); |
| 237 | 237 | fossil_print("%*s%d\n", colWidth, "events:", n); |
| 238 | 238 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'"); |
| 239 | 239 | fossil_print("%*s%d\n", colWidth, "tagchanges:", n); |
| 240 | - z = db_text(0, "SELECT datetime(mtime) ||" | |
| 241 | - " printf(' - about %%d days ago ',julianday('now') - mtime)" | |
| 242 | - " FROM event " | |
| 240 | + z = db_text(0, "SELECT datetime(mtime) || ' - about ' ||" | |
| 241 | + " CAST(julianday('now') - mtime AS INTEGER)" | |
| 242 | + " || ' days ago' FROM event " | |
| 243 | 243 | " ORDER BY mtime DESC LIMIT 1"); |
| 244 | 244 | fossil_print("%*s%s\n", colWidth, "latest-change:", z); |
| 245 | 245 | } |
| 246 | 246 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 247 | 247 | " + 0.99"); |
| 248 | 248 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -235,13 +235,13 @@ | |
| 235 | fossil_print("%*s%d (%d changes)\n", colWidth, "tickets:", n, m); |
| 236 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='e'"); |
| 237 | fossil_print("%*s%d\n", colWidth, "events:", n); |
| 238 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'"); |
| 239 | fossil_print("%*s%d\n", colWidth, "tagchanges:", n); |
| 240 | z = db_text(0, "SELECT datetime(mtime) ||" |
| 241 | " printf(' - about %%d days ago ',julianday('now') - mtime)" |
| 242 | " FROM event " |
| 243 | " ORDER BY mtime DESC LIMIT 1"); |
| 244 | fossil_print("%*s%s\n", colWidth, "latest-change:", z); |
| 245 | } |
| 246 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 247 | " + 0.99"); |
| 248 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -235,13 +235,13 @@ | |
| 235 | fossil_print("%*s%d (%d changes)\n", colWidth, "tickets:", n, m); |
| 236 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='e'"); |
| 237 | fossil_print("%*s%d\n", colWidth, "events:", n); |
| 238 | n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'"); |
| 239 | fossil_print("%*s%d\n", colWidth, "tagchanges:", n); |
| 240 | z = db_text(0, "SELECT datetime(mtime) || ' - about ' ||" |
| 241 | " CAST(julianday('now') - mtime AS INTEGER)" |
| 242 | " || ' days ago' FROM event " |
| 243 | " ORDER BY mtime DESC LIMIT 1"); |
| 244 | fossil_print("%*s%s\n", colWidth, "latest-change:", z); |
| 245 | } |
| 246 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 247 | " + 0.99"); |
| 248 |