Diff
Not logged in

Differences From:

File src/rebuild.c part of check-in [f46fe42d6d] - Store private ticket fields (ex: the originators email address) as their SHA1 hash so that malefactors cannot read them. Add the new "concealed" table to the repository database and store mappings from SHA1 hashes back to email addresses in that table. Ticket a24ec6005f. Note: run "rebuild" on repositories after updating to this version of fossil in order to create the "concealed" table. Need to add the ability to manage the concealed table from the web interface and the ability to sync concealed content between trusted repositories. by drh on 2008-07-24 02:04:36. [view]

To:

File src/rebuild.c part of check-in [3f6edbc779] - Update to the latest SQLite. Add a Rebuild button on the Shun webpage. Add the test-detach CLI method. by drh on 2008-11-10 00:40:10. [view]

@@ -285,5 +285,26 @@
     db_end_transaction(1);
   }else{
     db_end_transaction(0);
   }
+}
+
+/*
+** COMMAND:  test-detach
+**
+** Change the project-code and make other changes in order to prevent
+** the repository from ever again pushing or pulling to other
+** repositories.  Used to create a "test" repository for development
+** testing by cloning a working project repository.
+*/
+void test_detach_cmd(void){
+  db_find_and_open_repository(1);
+  db_begin_transaction();
+  db_multi_exec(
+    "DELETE FROM config WHERE name='last-sync-url';"
+    "UPDATE config SET value=lower(hex(randomblob(20)))"
+    " WHERE name='project-code';"
+    "UPDATE config SET value='detached-' || value"
+    " WHERE name='project-name' AND value NOT GLOB 'detached-*';"
+  );
+  db_end_transaction(0);
 }