# # add_file "tests/t_add_stomp_file.at" # # patch "ChangeLog" # from [17005e6b477d1e10e723855784f06be09057eb21] # to [1e1c391bdd1f85ec83bc7bf3cacc4680ba6ddbdd] # # patch "commands.cc" # from [e24b9d3f4cf1db10ea68ce3733c1a8bdafb5371d] # to [dde1422d1313b53651309387092c5526749dac1a] # # patch "database.cc" # from [39d6b99c913576436deb56633c84e9ce3c96f73d] # to [0a1542f214b0484670459195dac39b34ce961f27] # # patch "database.hh" # from [90a982ae9ae9e6ef58d778958e64735ba93b5029] # to [3a53260736a538a083b6bfeea95830663c3fccd7] # # patch "monotone.texi" # from [412d8c60e2a7e06ae07a6b8350393421d7f87b2b] # to [939f56de6aac68a630492031939ce4654f093203] # # patch "tests/t_add_stomp_file.at" # from [] # to [ff7f16f34c202ec044ad232af78786bd119b5e98] # # patch "testsuite.at" # from [63f222bf1549f1b5ea773c38860809fd131a88e4] # to [c9806d0931d6dec93838b7479f2d31b378be8453] # # patch "transforms.cc" # from [0301854cc96c7c43b527feb0ac5c2914537d9027] # to [61593e946306f8bd5926c02fca2ea683e510d271] # --- ChangeLog +++ ChangeLog @@ -6,8 +6,23 @@ branch globs and regexps. (glob_to_regexp_test): A unit test for glob_to_regexp(). +2005-04-16 Emile Snyder + + * tests/t_add_stomp_file.at: New test for failing case. + If you have a file foo in your working dir (not monotone + controlled) and someone else adds a file foo and commits, + update should at least warn you before stomping your + non-recoverable foo file. + * testsuite.at: Add it. + 2005-04-17 Matt Johnston + * commands.cc: warn that dropkey won't truly erase the privkey + from the database + * monotone.texi: same + +2005-04-17 Matt Johnston + * database.cc: mention that it could be the filesystem that is full in the SQLITE_FULL error message @@ -2906,7 +2921,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 @@ -1184,7 +1184,10 @@ if (app.db.private_key_exists(ident)) { - P(F("dropping private key '%s' from database\n") % ident); + P(F("dropping private key '%s' from database\n\n") % ident); + W(F("the private key data may not have been erased from the")); + W(F("database. it is recommended that you use 'db dump' and")); + W(F("'db load' to be sure.")); app.db.delete_private_key(ident); key_deleted = true; } @@ -2415,6 +2418,7 @@ "load\n" "migrate\n" "execute\n" + "kill_rev_locally \n" "check\n" "changesetify\n" "rebuild\n" @@ -2448,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: "<