Fossil SCM
The "fossil all ui" command no longer shows repositories that cannot be opened.
Commit
4c2504dce194002dc0a8124b160c256fa98735751e8773666348abc5b1900ef0
Parent
d60669c56476223…
1 file changed
+5
-7
+5
-7
| --- src/repolist.c | ||
| +++ src/repolist.c | ||
| @@ -46,11 +46,11 @@ | ||
| 46 | 46 | pRepo->isValid = 0; |
| 47 | 47 | pRepo->zProjName = 0; |
| 48 | 48 | pRepo->rMTime = 0.0; |
| 49 | 49 | |
| 50 | 50 | g.dbIgnoreErrors++; |
| 51 | - rc = sqlite3_open(pRepo->zRepoName, &db); | |
| 51 | + rc = sqlite3_open_v2(pRepo->zRepoName, &db, SQLITE_OPEN_READWRITE, 0); | |
| 52 | 52 | if( rc ) goto finish_repo_list; |
| 53 | 53 | rc = sqlite3_prepare_v2(db, "SELECT value FROM config" |
| 54 | 54 | " WHERE name='project-name'", |
| 55 | 55 | -1, &pStmt, 0); |
| 56 | 56 | if( rc ) goto finish_repo_list; |
| @@ -164,17 +164,15 @@ | ||
| 164 | 164 | } |
| 165 | 165 | x.zRepoName = zFull; |
| 166 | 166 | remote_repo_info(&x); |
| 167 | 167 | fossil_free(zFull); |
| 168 | 168 | if( !x.isValid ){ |
| 169 | - zAge = mprintf("..."); | |
| 170 | - iAge = 0; | |
| 171 | - }else{ | |
| 172 | - iAge = (rNow - x.rMTime)*86400; | |
| 173 | - if( iAge<0 ) x.rMTime = rNow; | |
| 174 | - zAge = human_readable_age(rNow - x.rMTime); | |
| 169 | + continue; | |
| 175 | 170 | } |
| 171 | + iAge = (rNow - x.rMTime)*86400; | |
| 172 | + if( iAge<0 ) x.rMTime = rNow; | |
| 173 | + zAge = human_readable_age(rNow - x.rMTime); | |
| 176 | 174 | @ <tr><td valign="top">\ |
| 177 | 175 | if( sqlite3_strglob("*.fossil", zName)!=0 ){ |
| 178 | 176 | /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands |
| 179 | 177 | ** do not work for repositories whose names do not end in ".fossil". |
| 180 | 178 | ** So do not hyperlink those cases. */ |
| 181 | 179 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -46,11 +46,11 @@ | |
| 46 | pRepo->isValid = 0; |
| 47 | pRepo->zProjName = 0; |
| 48 | pRepo->rMTime = 0.0; |
| 49 | |
| 50 | g.dbIgnoreErrors++; |
| 51 | rc = sqlite3_open(pRepo->zRepoName, &db); |
| 52 | if( rc ) goto finish_repo_list; |
| 53 | rc = sqlite3_prepare_v2(db, "SELECT value FROM config" |
| 54 | " WHERE name='project-name'", |
| 55 | -1, &pStmt, 0); |
| 56 | if( rc ) goto finish_repo_list; |
| @@ -164,17 +164,15 @@ | |
| 164 | } |
| 165 | x.zRepoName = zFull; |
| 166 | remote_repo_info(&x); |
| 167 | fossil_free(zFull); |
| 168 | if( !x.isValid ){ |
| 169 | zAge = mprintf("..."); |
| 170 | iAge = 0; |
| 171 | }else{ |
| 172 | iAge = (rNow - x.rMTime)*86400; |
| 173 | if( iAge<0 ) x.rMTime = rNow; |
| 174 | zAge = human_readable_age(rNow - x.rMTime); |
| 175 | } |
| 176 | @ <tr><td valign="top">\ |
| 177 | if( sqlite3_strglob("*.fossil", zName)!=0 ){ |
| 178 | /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands |
| 179 | ** do not work for repositories whose names do not end in ".fossil". |
| 180 | ** So do not hyperlink those cases. */ |
| 181 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -46,11 +46,11 @@ | |
| 46 | pRepo->isValid = 0; |
| 47 | pRepo->zProjName = 0; |
| 48 | pRepo->rMTime = 0.0; |
| 49 | |
| 50 | g.dbIgnoreErrors++; |
| 51 | rc = sqlite3_open_v2(pRepo->zRepoName, &db, SQLITE_OPEN_READWRITE, 0); |
| 52 | if( rc ) goto finish_repo_list; |
| 53 | rc = sqlite3_prepare_v2(db, "SELECT value FROM config" |
| 54 | " WHERE name='project-name'", |
| 55 | -1, &pStmt, 0); |
| 56 | if( rc ) goto finish_repo_list; |
| @@ -164,17 +164,15 @@ | |
| 164 | } |
| 165 | x.zRepoName = zFull; |
| 166 | remote_repo_info(&x); |
| 167 | fossil_free(zFull); |
| 168 | if( !x.isValid ){ |
| 169 | continue; |
| 170 | } |
| 171 | iAge = (rNow - x.rMTime)*86400; |
| 172 | if( iAge<0 ) x.rMTime = rNow; |
| 173 | zAge = human_readable_age(rNow - x.rMTime); |
| 174 | @ <tr><td valign="top">\ |
| 175 | if( sqlite3_strglob("*.fossil", zName)!=0 ){ |
| 176 | /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands |
| 177 | ** do not work for repositories whose names do not end in ".fossil". |
| 178 | ** So do not hyperlink those cases. */ |
| 179 |