#
# patch "ChangeLog"
# from [0b2b361c69e5acd4d580f049c7aa95f6571162dc]
# to [b66dd11efda1630f2785f0af8e3c9183683717da]
#
# patch "commands.cc"
# from [e351cc76be3dbe3eaa3d9a35f69a3efe5b09c414]
# to [dde1422d1313b53651309387092c5526749dac1a]
#
# patch "database.cc"
# from [39d6b99c913576436deb56633c84e9ce3c96f73d]
# to [0a1542f214b0484670459195dac39b34ce961f27]
#
# patch "database.hh"
# from [90a982ae9ae9e6ef58d778958e64735ba93b5029]
# to [3a53260736a538a083b6bfeea95830663c3fccd7]
#
--- ChangeLog
+++ ChangeLog
@@ -2934,7 +2934,7 @@
* AUTHORS: Mention Wojciech and Neil.
* revision.cc (calculate_ancestors_from_graph): Make non-recursive.
-2005-01-17 Wojciech MiÅkowski
+2005-01-17 Wojciech MiÅkowski
* std_hooks.lua: Teach about meld.
--- commands.cc
+++ commands.cc
@@ -2418,6 +2418,7 @@
"load\n"
"migrate\n"
"execute\n"
+ "kill_rev_locally \n"
"check\n"
"changesetify\n"
"rebuild\n"
@@ -2451,6 +2452,8 @@
{
if (idx(args, 0)() == "execute")
app.db.debug(idx(args, 1)(), cout);
+ else if (idx(args, 0)() == "kill_rev_locally")
+ app.db.delete_existing_revs_and_certs(idx(args, 1)());
else if (idx(args, 0)() == "clear_epoch")
app.db.clear_epoch(cert_value(idx(args, 1)()));
else
--- database.cc
+++ database.cc
@@ -1467,7 +1467,21 @@
execute("DELETE from revision_certs");
}
+/// Deletes one revision from the local database.
+/// This can be used to 'undo' a changed revision from a local database without
+/// leaving a trace
+void
+database::delete_existing_revs_and_certs(std::string const & rid){
+ //FIXME perform a completion here instead of blindly assigning
+ revision_id ident = (revision_id)rid;
+
+ N(revision_exists(ident),
+ F("no revision %s found in database") % ident);
+
+ cout << "This is a noop for now!!! It should delete rev: "<