Fossil SCM

On the repository list page, show Last Modified as 'unknown' for a repository with no entries in the event table (see [forum:/forumpost/993d5bcc8c | forum report]), and sort it still as oldest.

danield 2022-02-04 11:28 trunk
Commit 9e420127423fb7c70a7a780b78ac954816183712ff4ead45bd0529601a5af032
1 file changed +5
--- src/repolist.c
+++ src/repolist.c
@@ -212,10 +212,15 @@
212212
}else if( x.rMTime<0.0 ){
213213
x.rMTime = rNow;
214214
}
215215
iAge = (int)(rNow - x.rMTime)*86400;
216216
zAge = human_readable_age(rNow - x.rMTime);
217
+ if( x.rMTime==0.0 ){
218
+ /* This repository has no entry in the "event" table.
219
+ ** Its age will still be maximum, so data-sortkey will work. */
220
+ zAge = mprintf("unknown");
221
+ }
217222
blob_append_sql(&html, "<tr><td valign='top'>");
218223
if( sqlite3_strglob("*.fossil", zName)!=0 ){
219224
/* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands
220225
** do not work for repositories whose names do not end in ".fossil".
221226
** So do not hyperlink those cases. */
222227
--- src/repolist.c
+++ src/repolist.c
@@ -212,10 +212,15 @@
212 }else if( x.rMTime<0.0 ){
213 x.rMTime = rNow;
214 }
215 iAge = (int)(rNow - x.rMTime)*86400;
216 zAge = human_readable_age(rNow - x.rMTime);
 
 
 
 
 
217 blob_append_sql(&html, "<tr><td valign='top'>");
218 if( sqlite3_strglob("*.fossil", zName)!=0 ){
219 /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands
220 ** do not work for repositories whose names do not end in ".fossil".
221 ** So do not hyperlink those cases. */
222
--- src/repolist.c
+++ src/repolist.c
@@ -212,10 +212,15 @@
212 }else if( x.rMTime<0.0 ){
213 x.rMTime = rNow;
214 }
215 iAge = (int)(rNow - x.rMTime)*86400;
216 zAge = human_readable_age(rNow - x.rMTime);
217 if( x.rMTime==0.0 ){
218 /* This repository has no entry in the "event" table.
219 ** Its age will still be maximum, so data-sortkey will work. */
220 zAge = mprintf("unknown");
221 }
222 blob_append_sql(&html, "<tr><td valign='top'>");
223 if( sqlite3_strglob("*.fossil", zName)!=0 ){
224 /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands
225 ** do not work for repositories whose names do not end in ".fossil".
226 ** So do not hyperlink those cases. */
227

Keyboard Shortcuts

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