Differences From
Artifact [d5e0c2dc]:
- File
src/allrepo.c
— part of check-in
[69974aaa]
at
2014-04-03 19:13:42
on branch trunk
— Enhance the 'fossil extras' and 'fossil all extras' commands using the new --header option to get them to print the associated repository first.
(user:
mistachkin
size: 11413)
[more...]
- File
src/allrepo.c
— part of check-in
[9df71fe3]
at
2014-04-28 10:26:24
on branch trunk
— Use file_access(..., F_OK) in stead of file_access(..., 0) everywhere, in case some platforms exist where F_OK != 0.
Remove a few end-of-line spaces.
(user:
jan.nijtmans
size: 11412)
[more...]
153 153 int useCheckouts = 0;
154 154 int quiet = 0;
155 155 int dryRunFlag = 0;
156 156 int showFile = find_option("showfile",0,0)!=0;
157 157 int stopOnError = find_option("dontstop",0,0)==0;
158 158 int rc;
159 159 int nToDel = 0;
160 -
160 +
161 161 dryRunFlag = find_option("dry-run","n",0)!=0;
162 162 if( !dryRunFlag ){
163 163 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
164 164 }
165 165
166 166 if( g.argc<3 ){
167 167 usage("changes|clean|extras|ignore|list|ls|pull|push|rebuild|sync");
................................................................................
280 280 " WHERE substr(name, 1, 5)=='repo:'"
281 281 " ORDER BY 1"
282 282 );
283 283 }
284 284 db_multi_exec("CREATE TEMP TABLE todel(x TEXT)");
285 285 while( db_step(&q)==SQLITE_ROW ){
286 286 const char *zFilename = db_column_text(&q, 0);
287 - if( file_access(zFilename, 0)
287 + if( file_access(zFilename, F_OK)
288 288 || !file_is_canonical(zFilename)
289 289 || (useCheckouts && file_isdir(zFilename)!=1)
290 290 ){
291 291 db_multi_exec("INSERT INTO todel VALUES(%Q)", db_column_text(&q, 1));
292 292 nToDel++;
293 293 continue;
294 294 }
................................................................................
310 310 free(zSyscmd);
311 311 free(zQFilename);
312 312 if( stopOnError && rc ){
313 313 break;
314 314 }
315 315 }
316 316 db_finalize(&q);
317 -
317 +
318 318 /* If any repositories whose names appear in the ~/.fossil file could not
319 319 ** be found, remove those names from the ~/.fossil file.
320 320 */
321 321 if( nToDel>0 ){
322 322 const char *zSql = "DELETE FROM global_config WHERE name IN toDel";
323 323 if( dryRunFlag ){
324 324 fossil_print("%s\n", zSql);
325 325 }else{
326 326 db_multi_exec(zSql);
327 327 }
328 328 }
329 329 }