Fossil SCM

'close' now removes ckout:... entry from global config and repo. Possibly has unwanted side-effects, thus a branch.

stephan 2014-05-30 16:38 UTC trunk
Commit 36cb9ec4760495b443635a33ff3e001c08ed904a
1 file changed +4 -2
+4 -2
--- src/checkout.c
+++ src/checkout.c
@@ -302,12 +302,14 @@
302302
db_name("localdb"))
303303
&& db_exists("SELECT 1 FROM %s.stash", db_name("localdb"))
304304
){
305305
fossil_fatal("closing the checkout will delete your stash");
306306
}
307
- if( db_is_writeable("repository") ){
308
- db_multi_exec("DELETE FROM config WHERE name='ckout:%q'", g.zLocalRoot);
307
+ {
308
+ char * zUnset = mprintf("ckout:%q", g.zLocalRoot);
309
+ db_unset(zUnset, 1);
310
+ fossil_free(zUnset);
309311
}
310312
unlink_local_database(1);
311313
db_close(1);
312314
unlink_local_database(0);
313315
}
314316
--- src/checkout.c
+++ src/checkout.c
@@ -302,12 +302,14 @@
302 db_name("localdb"))
303 && db_exists("SELECT 1 FROM %s.stash", db_name("localdb"))
304 ){
305 fossil_fatal("closing the checkout will delete your stash");
306 }
307 if( db_is_writeable("repository") ){
308 db_multi_exec("DELETE FROM config WHERE name='ckout:%q'", g.zLocalRoot);
 
 
309 }
310 unlink_local_database(1);
311 db_close(1);
312 unlink_local_database(0);
313 }
314
--- src/checkout.c
+++ src/checkout.c
@@ -302,12 +302,14 @@
302 db_name("localdb"))
303 && db_exists("SELECT 1 FROM %s.stash", db_name("localdb"))
304 ){
305 fossil_fatal("closing the checkout will delete your stash");
306 }
307 {
308 char * zUnset = mprintf("ckout:%q", g.zLocalRoot);
309 db_unset(zUnset, 1);
310 fossil_free(zUnset);
311 }
312 unlink_local_database(1);
313 db_close(1);
314 unlink_local_database(0);
315 }
316

Keyboard Shortcuts

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