Fossil SCM

When doing configure pull --overwrite, ensure that the USER table can be overwritten by removing the db-protect flag on it.

stephan 2022-07-04 01:06 trunk
Commit 7384cf515274dd4ca660164c8d681d587a5f340a58c51c8dbe61c06595c8fa71
1 file changed +2
--- src/configure.c
+++ src/configure.c
@@ -844,11 +844,13 @@
844844
url_enable_proxy("via proxy: ");
845845
if( overwriteFlag ) mask |= CONFIGSET_OVERWRITE;
846846
if( strncmp(zMethod, "push", n)==0 ){
847847
client_sync(0,0,(unsigned)mask,0);
848848
}else if( strncmp(zMethod, "pull", n)==0 ){
849
+ if( overwriteFlag ) db_unprotect(PROTECT_USER);
849850
client_sync(0,(unsigned)mask,0,0);
851
+ if( overwriteFlag ) db_protect_pop();
850852
}else{
851853
client_sync(0,(unsigned)mask,(unsigned)mask,0);
852854
}
853855
}else
854856
if( strncmp(zMethod, "reset", n)==0 ){
855857
--- src/configure.c
+++ src/configure.c
@@ -844,11 +844,13 @@
844 url_enable_proxy("via proxy: ");
845 if( overwriteFlag ) mask |= CONFIGSET_OVERWRITE;
846 if( strncmp(zMethod, "push", n)==0 ){
847 client_sync(0,0,(unsigned)mask,0);
848 }else if( strncmp(zMethod, "pull", n)==0 ){
 
849 client_sync(0,(unsigned)mask,0,0);
 
850 }else{
851 client_sync(0,(unsigned)mask,(unsigned)mask,0);
852 }
853 }else
854 if( strncmp(zMethod, "reset", n)==0 ){
855
--- src/configure.c
+++ src/configure.c
@@ -844,11 +844,13 @@
844 url_enable_proxy("via proxy: ");
845 if( overwriteFlag ) mask |= CONFIGSET_OVERWRITE;
846 if( strncmp(zMethod, "push", n)==0 ){
847 client_sync(0,0,(unsigned)mask,0);
848 }else if( strncmp(zMethod, "pull", n)==0 ){
849 if( overwriteFlag ) db_unprotect(PROTECT_USER);
850 client_sync(0,(unsigned)mask,0,0);
851 if( overwriteFlag ) db_protect_pop();
852 }else{
853 client_sync(0,(unsigned)mask,(unsigned)mask,0);
854 }
855 }else
856 if( strncmp(zMethod, "reset", n)==0 ){
857

Keyboard Shortcuts

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