Fossil

Check-in [36cb9ec4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:'close' now removes ckout:... entry from global config and repo. Possibly has unwanted side-effects, thus a branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | close-cleanup-config
Files: files | file ages | folders
SHA1: 36cb9ec4760495b443635a33ff3e001c08ed904a
User & Date: stephan 2014-05-30 16:38:19
Context
2014-05-30
16:52
Now only remove the ckout:... key if the repo db is writeable. May leave orphans in the config db for read-only repos, but it was doing that before, anyway. Closed-Leaf check-in: 43eeab7c user: stephan tags: close-cleanup-config
16:38
'close' now removes ckout:... entry from global config and repo. Possibly has unwanted side-effects, thus a branch. check-in: 36cb9ec4 user: stephan tags: close-cleanup-config
2014-05-28
20:24
Update the build-in SQLite from upstream. The "fossil sql" command now supports the ".shell" meta-command. check-in: f6d3b815 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkout.c.

300
301
302
303
304
305
306
307

308


309
310
311
312
313
  if( !forceFlag
   && db_exists("SELECT 1 FROM %s.sqlite_master WHERE name='stash'",
                db_name("localdb"))
   && db_exists("SELECT 1 FROM %s.stash", db_name("localdb"))
  ){
    fossil_fatal("closing the checkout will delete your stash");
  }
  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);
}







<
>
|
>
>





300
301
302
303
304
305
306

307
308
309
310
311
312
313
314
315
  if( !forceFlag
   && db_exists("SELECT 1 FROM %s.sqlite_master WHERE name='stash'",
                db_name("localdb"))
   && db_exists("SELECT 1 FROM %s.stash", db_name("localdb"))
  ){
    fossil_fatal("closing the checkout will delete your stash");
  }

  {
    char * zUnset = mprintf("ckout:%q", g.zLocalRoot);
    db_unset(zUnset, 1);
    fossil_free(zUnset);
  }
  unlink_local_database(1);
  db_close(1);
  unlink_local_database(0);
}