Fossil

Diff
Login

Diff

Differences From Artifact [19be855bdf]:

To Artifact [91fd87e726]:


289
290
291
292
293
294
295



296
297
298
299
300
301
302
*/
void close_cmd(void){
  int forceFlag = find_option("force","f",0)!=0;
  db_must_be_within_tree();
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }



  unlink_local_database(1);
  db_close(1);
  unlink_local_database(0);
}

/* 
 * vim:ts=2:sts=2:et:sw=2:ft=c 







>
>
>







289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
*/
void close_cmd(void){
  int forceFlag = find_option("force","f",0)!=0;
  db_must_be_within_tree();
  if( !forceFlag && unsaved_changes()==1 ){
    fossil_fatal("there are unsaved changes in the current checkout");
  }
  if( db_is_writeable("repository") ){
    db_multi_exec("DELETE FROM config WHERE name='ckout:%q'", g.zLocalRoot);
  }
  unlink_local_database(1);
  db_close(1);
  unlink_local_database(0);
}

/* 
 * vim:ts=2:sts=2:et:sw=2:ft=c