Fossil SCM

The "fossil all ui" command no longer shows repositories that cannot be opened.

drh 2019-05-16 14:34 trunk
Commit 4c2504dce194002dc0a8124b160c256fa98735751e8773666348abc5b1900ef0
1 file changed +5 -7
+5 -7
--- src/repolist.c
+++ src/repolist.c
@@ -46,11 +46,11 @@
4646
pRepo->isValid = 0;
4747
pRepo->zProjName = 0;
4848
pRepo->rMTime = 0.0;
4949
5050
g.dbIgnoreErrors++;
51
- rc = sqlite3_open(pRepo->zRepoName, &db);
51
+ rc = sqlite3_open_v2(pRepo->zRepoName, &db, SQLITE_OPEN_READWRITE, 0);
5252
if( rc ) goto finish_repo_list;
5353
rc = sqlite3_prepare_v2(db, "SELECT value FROM config"
5454
" WHERE name='project-name'",
5555
-1, &pStmt, 0);
5656
if( rc ) goto finish_repo_list;
@@ -164,17 +164,15 @@
164164
}
165165
x.zRepoName = zFull;
166166
remote_repo_info(&x);
167167
fossil_free(zFull);
168168
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;
175170
}
171
+ iAge = (rNow - x.rMTime)*86400;
172
+ if( iAge<0 ) x.rMTime = rNow;
173
+ zAge = human_readable_age(rNow - x.rMTime);
176174
@ <tr><td valign="top">\
177175
if( sqlite3_strglob("*.fossil", zName)!=0 ){
178176
/* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands
179177
** do not work for repositories whose names do not end in ".fossil".
180178
** So do not hyperlink those cases. */
181179
--- 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

Keyboard Shortcuts

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