# # # patch "tests/drop_root/__driver__.lua" # from [ae69c6c17f2906e8db03ade626f757ad0c8cb74b] # to [d4e04bfb3761a0c59a768ecd86e24e54f302abb5] # # patch "work.cc" # from [528c2330217aea20d4fdcf47b68705fcd6cfb152] # to [25cb3a15d4093b92e89eaf6f77f8755adb622565] # ============================================================ --- tests/drop_root/__driver__.lua ae69c6c17f2906e8db03ade626f757ad0c8cb74b +++ tests/drop_root/__driver__.lua d4e04bfb3761a0c59a768ecd86e24e54f302abb5 @@ -1,13 +1,13 @@ mtn_setup() mtn_setup() -- We should not allow dropping the root, no matter how -- we refer to it. Test that via "." in the root itself.. -xfail(mtn("drop", "."), 1, false, false) +check(mtn("drop", "."), 1, false, false) -- ..or from a subdirectory via ".." mkdir("dir") check(mtn("add", "dir"), 0, false, false) +check(indir("dir", mtn("drop", "..", "--recursive")), 1, false, false) -xfail(indir("dir", mtn("drop", "..", "--recursive")), 1, false, false) ============================================================ --- work.cc 528c2330217aea20d4fdcf47b68705fcd6cfb152 +++ work.cc 25cb3a15d4093b92e89eaf6f77f8755adb622565 @@ -1376,6 +1376,9 @@ workspace::perform_deletions(path_set co split_path &p(todo.front()); file_path name(p); + E(!name.empty(), + F("unable to drop the root of the repository")); + if (!new_roster.has_node(p)) P(F("skipping %s, not currently tracked") % name); else