Fossil SCM
Make the "ls" command report MISSING instead of EDITED for files that do not exist in the tree. Ticket [ce458c35ca].
Commit
89d100b8451bda7fcf82acdbb70999d866175900
Parent
d5cd3251fa4b864…
1 file changed
+4
+4
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -134,19 +134,23 @@ | ||
| 134 | 134 | while( db_step(&q)==SQLITE_ROW ){ |
| 135 | 135 | const char *zPathname = db_column_text(&q,0); |
| 136 | 136 | int isDeleted = db_column_int(&q, 1); |
| 137 | 137 | int isNew = db_column_int(&q,2)==0; |
| 138 | 138 | int chnged = db_column_int(&q,3); |
| 139 | + char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname); | |
| 139 | 140 | if( isNew ){ |
| 140 | 141 | printf("ADDED %s\n", zPathname); |
| 142 | + }else if( access(zFullName, 0) ){ | |
| 143 | + printf("MISSING %s\n", zPathname); | |
| 141 | 144 | }else if( isDeleted ){ |
| 142 | 145 | printf("DELETED %s\n", zPathname); |
| 143 | 146 | }else if( chnged ){ |
| 144 | 147 | printf("EDITED %s\n", zPathname); |
| 145 | 148 | }else{ |
| 146 | 149 | printf("UNCHANGED %s\n", zPathname); |
| 147 | 150 | } |
| 151 | + free(zFullName); | |
| 148 | 152 | } |
| 149 | 153 | db_finalize(&q); |
| 150 | 154 | } |
| 151 | 155 | |
| 152 | 156 | /* |
| 153 | 157 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -134,19 +134,23 @@ | |
| 134 | while( db_step(&q)==SQLITE_ROW ){ |
| 135 | const char *zPathname = db_column_text(&q,0); |
| 136 | int isDeleted = db_column_int(&q, 1); |
| 137 | int isNew = db_column_int(&q,2)==0; |
| 138 | int chnged = db_column_int(&q,3); |
| 139 | if( isNew ){ |
| 140 | printf("ADDED %s\n", zPathname); |
| 141 | }else if( isDeleted ){ |
| 142 | printf("DELETED %s\n", zPathname); |
| 143 | }else if( chnged ){ |
| 144 | printf("EDITED %s\n", zPathname); |
| 145 | }else{ |
| 146 | printf("UNCHANGED %s\n", zPathname); |
| 147 | } |
| 148 | } |
| 149 | db_finalize(&q); |
| 150 | } |
| 151 | |
| 152 | /* |
| 153 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -134,19 +134,23 @@ | |
| 134 | while( db_step(&q)==SQLITE_ROW ){ |
| 135 | const char *zPathname = db_column_text(&q,0); |
| 136 | int isDeleted = db_column_int(&q, 1); |
| 137 | int isNew = db_column_int(&q,2)==0; |
| 138 | int chnged = db_column_int(&q,3); |
| 139 | char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname); |
| 140 | if( isNew ){ |
| 141 | printf("ADDED %s\n", zPathname); |
| 142 | }else if( access(zFullName, 0) ){ |
| 143 | printf("MISSING %s\n", zPathname); |
| 144 | }else if( isDeleted ){ |
| 145 | printf("DELETED %s\n", zPathname); |
| 146 | }else if( chnged ){ |
| 147 | printf("EDITED %s\n", zPathname); |
| 148 | }else{ |
| 149 | printf("UNCHANGED %s\n", zPathname); |
| 150 | } |
| 151 | free(zFullName); |
| 152 | } |
| 153 | db_finalize(&q); |
| 154 | } |
| 155 | |
| 156 | /* |
| 157 |