# # # patch "cmd_db.cc" # from [6a53f8c43ec53a7c59d7762889efda9c720cac87] # to [2325e32730afad746c8456ca0c3990d7f03e1345] # # patch "tests/cert_no_branch/__driver__.lua" # from [1ff1912c0631df6a123e3d2178b83beba91cfb9f] # to [a9ddcf09bae61516147101b1a0927a71d172779e] # # patch "tests/db_kill_certs_locally/__driver__.lua" # from [f086f265480052907b09f15a6376a5b2596610a7] # to [4373aef4afa8918602775ab2a3beb205a9d27d69] # # patch "tests/db_kill_rev_locally/__driver__.lua" # from [263eda4a85f0e5f3432c23650348a07748fef51b] # to [bdfc3b6b7dabca3282060d19cde81a20b07095cf] # # patch "tests/db_kill_rev_locally_and_recommit/__driver__.lua" # from [7cef8d202d231382411754cfc197ce37f32ab49b] # to [baf41e1cbe012e8af4c57514d05018c7b4fe9997] # # patch "tests/db_kill_rev_locally_workspace/__driver__.lua" # from [54ac3511d65d20e1a91138c515cb5a361896a536] # to [8902d6b2bbdabee3e9f70f61fc5288c48f46027c] # # patch "tests/resolve_conflicts_all_merge_commands/__driver__.lua" # from [760d25d67c6852d96083b3d1c0177a9e97274481] # to [8bde002a97f0a005868c1a4998252105340b138b] # # patch "tests/update_to_off-branch_rev/__driver__.lua" # from [1527c638c97122225cffa06b84effc5c7abf81cb] # to [2c6b4c6923edcf682212902a224ad43173998ee4] # ============================================================ --- cmd_db.cc 6a53f8c43ec53a7c59d7762889efda9c720cac87 +++ cmd_db.cc 2325e32730afad746c8456ca0c3990d7f03e1345 @@ -168,7 +168,13 @@ CMD(db_execute, "execute", "", CMD_REF(d db.debug(idx(args, 0)(), cout); } -CMD(db_kill_rev_locally, "kill_rev_locally", "", CMD_REF(db), "ID", +CMD_GROUP(db_local, "local", "", CMD_REF(database), + N_("Commands that delete items from the local database. Deletions " + "cannot be propagated through netsync, so the deleted items will " + "come back if you sync with a database that still has them."), + ""); + +CMD(db_kill_rev_locally, "kill_revision", "", CMD_REF(db_local), "ID", N_("Kills a revision from the local database"), "", options::opts::none) @@ -240,7 +246,7 @@ CMD(db_kill_rev_locally, "kill_rev_local db.delete_existing_rev_and_certs(revid); } -CMD(db_kill_certs_locally, "kill_certs_locally", "", CMD_REF(db), +CMD(db_kill_certs_locally, "kill_certs", "", CMD_REF(db_local), "SELECTOR CERTNAME [CERTVAL]", N_("Deletes the specified certs from the local database"), N_("Deletes all certs which are on the given revision(s) and " ============================================================ --- tests/cert_no_branch/__driver__.lua 1ff1912c0631df6a123e3d2178b83beba91cfb9f +++ tests/cert_no_branch/__driver__.lua a9ddcf09bae61516147101b1a0927a71d172779e @@ -10,7 +10,7 @@ rev = base_revision() rev = base_revision() -- delete the branch cert from the revision -check(mtn("db", "kill_certs_locally", rev, "branch", "testbranch"), 0, false, false) +check(mtn("local", "kill_certs", rev, "branch", "testbranch"), 0, false, false) -- ensure we don't find a branch option remove("_MTN") ============================================================ --- tests/db_kill_certs_locally/__driver__.lua f086f265480052907b09f15a6376a5b2596610a7 +++ tests/db_kill_certs_locally/__driver__.lua 4373aef4afa8918602775ab2a3beb205a9d27d69 @@ -34,7 +34,7 @@ check(qgrep(rev2, "stdout")) check(mtn("heads", "-b", "otherbranch"), 0, true, false) check(qgrep(rev2, "stdout")) -check(mtn("db", "kill_certs_locally", "i:", "branch", "somebranch"), 0, nil, false) +check(mtn("local", "kill_certs", "i:", "branch", "somebranch"), 0, nil, false) check(mtn("ls", "epochs"), 0, true) check(not qgrep("somebranch", "stdout")) @@ -54,13 +54,13 @@ check(qgrep(rev2:sub(0,10), "stdout")) check(qgrep(rev1:sub(0,10), "stdout")) check(qgrep(rev2:sub(0,10), "stdout")) -check(mtn("db", "kill_certs_locally", "t:*", "tag"), 0, nil, false) +check(mtn("local", "kill_certs", "t:*", "tag"), 0, nil, false) check(mtn("ls", "tags")) -- check that branch heads get handled correctly check(mtn("heads", "-b", "otherbranch"), 0, true, false) check(qgrep(rev2, "stdout")) -check(mtn("db", "kill_certs_locally", "h:otherbranch", "branch", "otherbranch"), 0, nil, false) +check(mtn("local", "kill_certs", "h:otherbranch", "branch", "otherbranch"), 0, nil, false) check(mtn("heads", "-b", "otherbranch"), 0, true, false) check(not qgrep(rev2, "stdout")) check(qgrep(rev1, "stdout")) \ No newline at end of file ============================================================ --- tests/db_kill_rev_locally/__driver__.lua 263eda4a85f0e5f3432c23650348a07748fef51b +++ tests/db_kill_rev_locally/__driver__.lua bdfc3b6b7dabca3282060d19cde81a20b07095cf @@ -1,7 +1,7 @@ mtn_setup() mtn_setup() --- This tests the db kill_rev_locally command +-- This tests the local kill_revision command -- Prepare a db with two revisions addfile("testfile", "blah blah") @@ -14,19 +14,19 @@ check(mtn("update", "-r", ancestor), 0, check(mtn("update", "-r", ancestor), 0, false, false) -- trying to kill the ancestor. This *is supposed to fail* -check(mtn("db", "kill_rev_locally", ancestor), 1, false, false) +check(mtn("local", "kill_revision", ancestor), 1, false, false) check(mtn("automate", "get_revision", ancestor), 0, false, false) check(mtn("db", "check"), 0, false, false) -- killing children is ok, though :) check(mtn("automate", "get_revision", child), 0, false, false) -check(mtn("db", "kill_rev_locally", child), 0, false, false) +check(mtn("local", "kill_revision", child), 0, false, false) check(mtn("automate", "get_revision", child), 1, false, false) check(mtn("db", "check"), 0, false, false) -- now that we've killed the child, the head is ancestor and should be -- possible to kill as well check(mtn("automate", "get_revision", ancestor), 0, false, false) -check(mtn("db", "kill_rev_locally", ancestor), 0, false, false) +check(mtn("local", "kill_revision", ancestor), 0, false, false) check(mtn("automate", "get_revision", ancestor), 1, false, false) check(mtn("db", "check"), 0, false, false) ============================================================ --- tests/db_kill_rev_locally_and_recommit/__driver__.lua 7cef8d202d231382411754cfc197ce37f32ab49b +++ tests/db_kill_rev_locally_and_recommit/__driver__.lua baf41e1cbe012e8af4c57514d05018c7b4fe9997 @@ -20,7 +20,7 @@ chdir("..") chdir("..") -- kill_rev_locally the new child -check(mtn("db", "kill_rev_locally", new_rev1)) +check(mtn("local", "kill_revision", new_rev1)) -- recreate and attempt to commit the same child again from base mkdir("test2") ============================================================ --- tests/db_kill_rev_locally_workspace/__driver__.lua 54ac3511d65d20e1a91138c515cb5a361896a536 +++ tests/db_kill_rev_locally_workspace/__driver__.lua 8902d6b2bbdabee3e9f70f61fc5288c48f46027c @@ -15,16 +15,16 @@ addfile("third", "third") -- ensure that the revision cannot be removed if there are changes... addfile("third", "third") -check(mtn("db", "kill_rev_locally", second), 1, false, false) +check(mtn("local", "kill_revision", second), 1, false, false) check(mtn("drop", "third"), 0, false, false) -- ...or missing files in the workspace remove("second") -check(mtn("db", "kill_rev_locally", second), 1, false, false) +check(mtn("local", "kill_revision", second), 1, false, false) check(mtn("revert", "."), 0, false, false) -- now check that the revision is properly recreated if the revision -- is killed for real... -check(mtn("db", "kill_rev_locally", second), 0, false, false) +check(mtn("local", "kill_revision", second), 0, false, false) check(base_revision() == first) -- ...and if the changes can be recommitted so the same revision is created commit() @@ -35,5 +35,5 @@ addfile("fourth", "fourth") -- a revision which is not the base of the current workspace check(mtn("update", "-r", first), 0, false, false) addfile("fourth", "fourth") -check(mtn("db", "kill_rev_locally", second), 0, false, false) +check(mtn("local", "kill_revision", second), 0, false, false) ============================================================ --- tests/resolve_conflicts_all_merge_commands/__driver__.lua 760d25d67c6852d96083b3d1c0177a9e97274481 +++ tests/resolve_conflicts_all_merge_commands/__driver__.lua 8bde002a97f0a005868c1a4998252105340b138b @@ -57,11 +57,11 @@ merged = merged_revision() check(mtn("propagate", branch , branch .. "-propagate", "--resolve-conflicts"), 0, nil, true) merged = merged_revision() -check(mtn("db", "kill_rev_locally", merged), 0, nil, true) +check(mtn("local", "kill_revision", merged), 0, nil, true) check(mtn("explicit_merge", first, second, branch,"--resolve-conflicts"), 0, nil, true) merged = merged_revision() -check(mtn("db", "kill_rev_locally", merged), 0, nil, true) +check(mtn("local", "kill_revision", merged), 0, nil, true) -- create a second head on 'branch' writefile("foo", branch .. "-foo third revision") @@ -70,6 +70,6 @@ merged = merged_revision() check(mtn("conflicts", "resolve_first", "user", "foo"), 0, nil, nil) check(mtn("merge", "--branch", branch, "--resolve-conflicts"), 0, nil, true) merged = merged_revision() -check(mtn("db", "kill_rev_locally", merged), 0, nil, true) +check(mtn("local", "kill_revision", merged), 0, nil, true) -- end of file ============================================================ --- tests/update_to_off-branch_rev/__driver__.lua 1527c638c97122225cffa06b84effc5c7abf81cb +++ tests/update_to_off-branch_rev/__driver__.lua 2c6b4c6923edcf682212902a224ad43173998ee4 @@ -18,7 +18,7 @@ revs.n = base_revision() writefile("testfile", "double double") commit("nobranch") revs.n = base_revision() -check(mtn("db", "kill_certs_locally", "i:", "branch", "nobranch"), 0, nil, false) +check(mtn("local", "kill_certs", "i:", "branch", "nobranch"), 0, nil, false) check(mtn("checkout", "--branch=testbranch", "--revision", revs.t, "codir"), 0, false, false) check(grep('^ *branch "testbranch"', "codir/_MTN/options"), 0, false, false)