# # # add_dir "tests/db_kill_rev_locally_workspace" # # add_file "tests/db_kill_rev_locally_workspace/__driver__.lua" # content [54ac3511d65d20e1a91138c515cb5a361896a536] # # patch "NEWS" # from [aec3d63acf755f5d84067d873cda431c3849df68] # to [f76a1c6eef85248185d82e27a78d8c10f73d6b29] # ============================================================ --- tests/db_kill_rev_locally_workspace/__driver__.lua 54ac3511d65d20e1a91138c515cb5a361896a536 +++ tests/db_kill_rev_locally_workspace/__driver__.lua 54ac3511d65d20e1a91138c515cb5a361896a536 @@ -0,0 +1,39 @@ +-- +-- These tests ensure that a workspace which is affected by a revision +-- removal is gracefully handled +-- + +mtn_setup() + +addfile("first", "first") +commit() +first = base_revision() + +addfile("second", "second") +commit() +second = base_revision() + +-- 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("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("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(base_revision() == first) +-- ...and if the changes can be recommitted so the same revision is created +commit() +check(base_revision() == second) + + +-- finally ensure that the workspace is not touched if we kill +-- 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) + ============================================================ --- NEWS aec3d63acf755f5d84067d873cda431c3849df68 +++ NEWS f76a1c6eef85248185d82e27a78d8c10f73d6b29 @@ -1,13 +1,24 @@ ??? ??? ? ??:??:?? UTC 2007 0.37 release. + Changes + + - mtn db kill_rev_locally now checks for an existing workspace + before the revision is killed and tries to apply the changes + of this particular revision back to the workspace to allow + easy re-committing afterwards + Bugs fixed - mtn automate heads called without a branch argument now properly returns the head revisions of the workspace's branch if called over mtn automate stdio + - mtn commit does no longer crash if it creates a revision whose + roster already exists, i.e. was left behind by the command + `mtn db kill_rev_locally REV` (savannah #18990) + Other - contrib/usher.cc has been removed. Please use the