Fossil SCM

Do not show checkouts with the "info -v" command or in the /urllist webpage if the checkout does not appear to exist any more.

drh 2017-07-03 23:18 trunk
Commit c666579cf5381ce264c2644d7a7697cd145f260579bdd6bd531bddf805c1d115
2 files changed +1 +3 -1
+1
--- src/info.c
+++ src/info.c
@@ -134,10 +134,11 @@
134134
" FROM config"
135135
" WHERE name GLOB 'ckout:*' ORDER BY mtime DESC");
136136
while( db_step(&s)==SQLITE_ROW ){
137137
const char *zName;
138138
const char *zCkout = db_column_text(&s, 0);
139
+ if( !vfile_top_of_checkout(zCkout) ) continue;
139140
if( g.localOpen ){
140141
if( fossil_strcmp(zCkout, g.zLocalRoot)==0 ) continue;
141142
zName = "alt-root:";
142143
}else{
143144
zName = "check-out:";
144145
--- src/info.c
+++ src/info.c
@@ -134,10 +134,11 @@
134 " FROM config"
135 " WHERE name GLOB 'ckout:*' ORDER BY mtime DESC");
136 while( db_step(&s)==SQLITE_ROW ){
137 const char *zName;
138 const char *zCkout = db_column_text(&s, 0);
 
139 if( g.localOpen ){
140 if( fossil_strcmp(zCkout, g.zLocalRoot)==0 ) continue;
141 zName = "alt-root:";
142 }else{
143 zName = "check-out:";
144
--- src/info.c
+++ src/info.c
@@ -134,10 +134,11 @@
134 " FROM config"
135 " WHERE name GLOB 'ckout:*' ORDER BY mtime DESC");
136 while( db_step(&s)==SQLITE_ROW ){
137 const char *zName;
138 const char *zCkout = db_column_text(&s, 0);
139 if( !vfile_top_of_checkout(zCkout) ) continue;
140 if( g.localOpen ){
141 if( fossil_strcmp(zCkout, g.zLocalRoot)==0 ) continue;
142 zName = "alt-root:";
143 }else{
144 zName = "check-out:";
145
+3 -1
--- src/stat.c
+++ src/stat.c
@@ -370,11 +370,13 @@
370370
@ <table border="0" width='100%%'>
371371
db_prepare(&q, "SELECT substr(name,7), datetime(mtime,'unixepoch')"
372372
" FROM config WHERE name GLOB 'ckout:*' ORDER BY 2 DESC");
373373
cnt = 0;
374374
while( db_step(&q)==SQLITE_ROW ){
375
- @ <tr><td width='100%%'>%h(db_column_text(&q,0))</td>
375
+ const char *zPath = db_column_text(&q,0);
376
+ if( !vfile_top_of_checkout(zPath) ) continue;
377
+ @ <tr><td width='100%%'>%h(zPath)</td>
376378
@ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
377379
cnt++;
378380
}
379381
db_finalize(&q);
380382
if( cnt==0 ){
381383
--- src/stat.c
+++ src/stat.c
@@ -370,11 +370,13 @@
370 @ <table border="0" width='100%%'>
371 db_prepare(&q, "SELECT substr(name,7), datetime(mtime,'unixepoch')"
372 " FROM config WHERE name GLOB 'ckout:*' ORDER BY 2 DESC");
373 cnt = 0;
374 while( db_step(&q)==SQLITE_ROW ){
375 @ <tr><td width='100%%'>%h(db_column_text(&q,0))</td>
 
 
376 @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
377 cnt++;
378 }
379 db_finalize(&q);
380 if( cnt==0 ){
381
--- src/stat.c
+++ src/stat.c
@@ -370,11 +370,13 @@
370 @ <table border="0" width='100%%'>
371 db_prepare(&q, "SELECT substr(name,7), datetime(mtime,'unixepoch')"
372 " FROM config WHERE name GLOB 'ckout:*' ORDER BY 2 DESC");
373 cnt = 0;
374 while( db_step(&q)==SQLITE_ROW ){
375 const char *zPath = db_column_text(&q,0);
376 if( !vfile_top_of_checkout(zPath) ) continue;
377 @ <tr><td width='100%%'>%h(zPath)</td>
378 @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr>
379 cnt++;
380 }
381 db_finalize(&q);
382 if( cnt==0 ){
383

Keyboard Shortcuts

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