# # # patch "cmd_ws_commit.cc" # from [a5f6214c20c9d96fb892e71b2cefab917e47c822] # to [eaa56feefa3fd7661dabe6013ba6789f801411bd] # # patch "tests/undrop/__driver__.lua" # from [a26d7680d4abe92aada7e48f745b08b47e35fa10] # to [f4fe106ba305ab8a757978c24c34a05be4d973ef] # ============================================================ --- cmd_ws_commit.cc a5f6214c20c9d96fb892e71b2cefab917e47c822 +++ cmd_ws_commit.cc eaa56feefa3fd7661dabe6013ba6789f801411bd @@ -392,15 +392,8 @@ CMD(undrop, "undrop", "", CMD_REF(worksp N_("Reverses a mistaken 'drop'"), N_("If the file was deleted from the workspace, this is the same as 'revert'. " "Otherwise, it just removes the 'drop' from the manifest."), - options::opts::recursive) + options::opts::none) { - // revert does not use the value of opts::recursive (it doesn't need to); - // we allow it as an option so the user can do: - // - // drop --recursive dir - // (realize mistake) - // undrop --recursive dir - revert(app, args, true); } ============================================================ --- tests/undrop/__driver__.lua a26d7680d4abe92aada7e48f745b08b47e35fa10 +++ tests/undrop/__driver__.lua f4fe106ba305ab8a757978c24c34a05be4d973ef @@ -39,7 +39,7 @@ check(not qgrep("patched unchanged", "s check(qgrep("patched changed", "stdout")) check(not qgrep("patched unchanged", "stdout")) --- recursive option on drop, undrop, with a changed file +-- drop undrop directory with a changed file mkdir("dir1") addfile("dir1/file1", "file1") addfile("dir1/file2", "file2") @@ -53,13 +53,13 @@ check(qgrep("dropping dir1 from workspac check(qgrep("dropping dir1/file2 from workspace", "stderr")) check(qgrep("dropping dir1 from workspace", "stderr")) -check(mtn("undrop", "--recursive", "dir1"), 0, false, true) +check(mtn("undrop", "dir1"), 0, false, true) check(readfile("dir1/file1")=="file1-changed") check(readfile("dir1/file2")=="file2") check(mtn("status"), 0, true, false) check(qgrep("patched dir1/file1", "stdout")) --- recursive option on drop, undrop, with no changed file +-- drop undrop directory with no changed file writefile("dir1/file1", "file1") check(mtn("drop", "--recursive", "dir1"), 0, false, true) @@ -67,7 +67,7 @@ check(qgrep("dropping dir1 from workspac check(qgrep("dropping dir1/file2 from workspace", "stderr")) check(qgrep("dropping dir1 from workspace", "stderr")) -check(mtn("undrop", "--recursive", "dir1"), 0, false, true) +check(mtn("undrop", "dir1"), 0, false, true) check(readfile("dir1/file1")=="file1") check(readfile("dir1/file2")=="file2") check(mtn("status"), 0, true, false)