# # # patch "lua-testsuite.lua" # from [4fda3918cfc0ae28563bde4675c1345a251a540d] # to [d8a7c77a64eeb8d26f4546e6fd6a7eabc55ad89b] # # patch "tests/automate_roots/__driver__.lua" # from [13ab764570fb854374d4c2310dff78cfd7977371] # to [59642b271e5d92f125f8ac30ec8374eff08031c6] # # patch "tests/cat_-r_REV_PATH/__driver__.lua" # from [1a7604541146055aabc8e19bfe8847515e8ae599] # to [231db4a272fa18981c04ee5d34fcbcc57d39e520] # # patch "tests/checkout_without_--branch_sets_branch/__driver__.lua" # from [cb9454891ca21ada23cd35827a873403eb81a99b] # to [39b215c6e644c856d51d58f25d6d03f2fc3db24f] # # patch "tests/commit_with_--message-file/__driver__.lua" # from [c489098cf8e352319705e1965af1632d06f68316] # to [e072e0dc6c01d82f49e6a8c6e0909a252e8e02eb] # # patch "tests/common/netsync.lua" # from [42a1fdb06317f8446d3374c40d46dd48bbe90e1c] # to [5d662438454b0eef9d42e399db5af5053ca19376] # # patch "tests/conflict_messages/__driver__.lua" # from [4294e488db07d33260abd6ab276fc85d9c2dd508] # to [a8cbfe5bd1655a84334c68bd65a5be4aaa40cd32] # # patch "tests/delete_work_file_on_checkout/__driver__.lua" # from [50b8a6cb1349cd4d275d0431471b929363c79303] # to [aa49c29bfcf89ea93eacf5441306930d2249ad0c] # # patch "tests/diffing_a_file_within_revision_outside_a_workspace/__driver__.lua" # from [b6b86da2a8eaec31c668e1ffa438d80e82982752] # to [fd4b16ad1fd1d3d2bc27b9bbf3761a3bf9b3f5ff] # # patch "tests/dump_on_crash/__driver__.lua" # from [318446527188e10853add4d6c9b7b82f450f34c8] # to [c2bb0d181c73f50ef66ca3fe89d49de76ee0b836] # # patch "tests/empty_string_as_a_path_name/__driver__.lua" # from [27e2081cdc69c569f84956584692067953ce3aac] # to [c14c1b9da9c750cbea2841d7041a549bc14ae46c] # # patch "tests/include()_includedir()_and_includedirpattern()_lua_functions/__driver__.lua" # from [9d0df9b28dc88e4ede507dabe7864595afd8b7d1] # to [329bde15df65b6daed069edf3bffc009060969d3] # # patch "tests/logging_a_file_within_revision_outside_a_workspace/__driver__.lua" # from [2f16087b6cfdba6e097f3a0f27918c64332ea4a7] # to [682f400983cd9b3919d479f5e4b71a99abf29192] # # patch "tests/lua_function_existsonpath/__driver__.lua" # from [fdf4def430dfd205c6e04ca774d35b7d0eeb9bcd] # to [4650b71b55c0f965b543d7761738f41b76bc6ce9] # # patch "tests/merge_conflict_with_no_lca/__driver__.lua" # from [024b58c36ab28c05edd9e308451863c3ae3852be] # to [4817dc9fe6889c9e8ecf0d22ae18fbd4835b9d30] # # patch "tests/merging_(add_a)_with_(add_a,_drop_a)/__driver__.lua" # from [95963fea52aff5dbd3ac034f8792f70ba9c6485e] # to [32036d35cc0b091281839a72dc8a090720426d09] # # patch "tests/merging_adds_in_unrelated_revisions/__driver__.lua" # from [1c368783de0067313a53b09df6cc9da2f743a385] # to [8a8e8bd3b48ab62b05272a27b8c0651fb2ca411b] # # patch "tests/merging_data_in_unrelated_revisions/__driver__.lua" # from [3cbfd34cc92b252f69183b0f29a9b491b3238296] # to [fe2c5e9addc18d0cd60b92844cdfc5d09b143e05] # # patch "tests/mtn_add_dot/__driver__.lua" # from [6858c894d4638b4b9c4dca9ed5e701a8a799918f] # to [4cc65e24a5dd351506c01def5458261cd1d2f792] # # patch "tests/netsync_duplicate_keys/__driver__.lua" # from [2836e143798cc5ec1eb8d1d02d7e0df54dd89ffc] # to [232c0e8e5333f6328b895f654cb2028d7b2ecb68] # # patch "tests/netsync_epochs_are_not_sent_upstream_by_pull/__driver__.lua" # from [4ec9d25eab337911fbab21281d28c945482a0ce6] # to [85fa6315b5d58225d78bfa1e784937f2308237af] # # patch "tests/netsync_key_hook/__driver__.lua" # from [f2a9ed3d90567968db34e9c16c90e8a5d4991aef] # to [301efa0ec3150bdc6a99830c6e037530fbe7229d] # # patch "tests/netsync_permissions/__driver__.lua" # from [9206b414713e9b678316304d3ce071543cc5433b] # to [3e9210e105be3808297336d8cc6a4bf7a91d1008] # # patch "tests/netsync_permissions_wildcards/__driver__.lua" # from [04dbe62bca9496f4b6385d2d0e7a412b018d084d] # to [9a490526d06fbbcbc05a294fd3105f82e641c181] # # patch "tests/netsync_server_absorbs_and_checks_epochs/__driver__.lua" # from [cc83b2b114c4065c65f166c731e7b9090892bf83] # to [489c7cc289dfbc7c3451441b1a90f037dcea359b] # # patch "tests/netsync_transfers_public_keys/__driver__.lua" # from [7c33043f7bea601ceb114aa57853ca0ecdbbdcca] # to [9edcd76fa4d5f2e9527397bd580bb50670b4116b] # # patch "tests/netsync_verifies_server_keys/__driver__.lua" # from [1faebbe461222b8dcf29847c982088237c12cd17] # to [1f58fbdbdfbfa06c2957894da05954751e58d6a6] # # patch "tests/netsync_with_globs/__driver__.lua" # from [9e790fb1196c3ee5cb391cbdcbae847e721e4044] # to [1bd6a216c54f39f54535e33359fbcc1b52e14c6e] # # patch "tests/one-way_netsync_where_the_sink_has_more_epochs/__driver__.lua" # from [bb8e382b933199a1949323f0d4005db68b6d17bf] # to [1d668c0b1614aad74af95e3638b47cde88092cbb] # # patch "tests/persistent_netsync_server_-_keys/__driver__.lua" # from [d9a6a5c55dc85ad55f06cb316dc4231ada807e93] # to [d64132ad0bbe6afd67e3172639cc50a57e0c294d] # # patch "tests/persistent_netsync_server_-_revs_&_certs/__driver__.lua" # from [ae88e5fbf13f1c3b47befa86b9e0397e9b835f20] # to [e883a9db42e7012b48a01fb7d738f127c206d0e9] # # patch "tests/pivot_root/__driver__.lua" # from [74d3f9a78052165a356b5958f1119f2309038a4c] # to [48b8380d0b147e15fc6aabb0ceb0c17db5a723b4] # # patch "tests/pivot_root_to_new_dir/__driver__.lua" # from [1aced95b97d46debcd4087b1624980c159de369f] # to [dd4b4b34dabcfe8458828840b5567c8c0f4671a1] # # patch "tests/reverting_a_pivot_root/__driver__.lua" # from [36d99a86c367367863e36a2af9d0911543d074f6] # to [a0f3e8bea99fb1035012ba68791e60e91551ed07] # # patch "tests/selecting_arbitrary_certs/__driver__.lua" # from [7983b55fd4facf13866cec15c72f0791524054c1] # to [ec74a911ba83789eb5e38a76c881d70cce6239ae] # # patch "tests/setup_checkout_touch_new__MTN_options_only/__driver__.lua" # from [98c2f1c859423898fa990c69333ebd521a2caf0f] # to [034891fefe9c3bfa27dbf5f6685911fb8a8016b7] # # patch "tests/setup_in_subdirectory/__driver__.lua" # from [5634b3a59b8c6c46bfe3d11ece82d2a856146dd5] # to [6e78e0b0386dd38f537eeb3d32321a635ffe2e44] # # patch "tests/setup_on_existing_path/__driver__.lua" # from [1ecc80aafde9b8410627cb08aad586dffe3721e0] # to [95058e096b5c2dc79a90998f2778e4e29e735131] # # patch "tests/single_character_filename_support/__driver__.lua" # from [1838b034aea2dbb2128ef03412223ff720c378a0] # to [3f883f7d20188ab3ff1fc06a3a99a00aecc58726] # # patch "tests/sticky_branches/__driver__.lua" # from [ed9188c29ff7be00e5ea2b7cde67b17432f8adda] # to [472fba176285d5b85d6672ed2a089772d96984fa] # # patch "tests/tags_and_tagging_of_revisions/__driver__.lua" # from [417a74a8f678051c254c7fc3a041d9f703987239] # to [1b0b72cb854c7be6d3a35f10d3f68fd03bbd8e5d] # # patch "tests/two_parent_workspace_pivot_root/__driver__.lua" # from [4cd99ef70412ee23cc86fcd2b6dce7a2c49c2bb0] # to [d0ca29e1a43e58f24e9bf893914e9c3f5257ed01] # # patch "tests/update_does_not_stomp_non-monotone_files/__driver__.lua" # from [72480446e72630b71f4fea0d2fc58d043e2cab9a] # to [c31f6d2557801d5c5eafc8734599042b3e1c4ed8] # # patch "tests/update_with_blocked_rename/__driver__.lua" # from [a93e2215543253fb346e4a9804c75467486769fd] # to [41ee460a7cbe01fca2e9f2753da0bf247e00e28d] # # patch "tests/updating_through_a_pivot_root/__driver__.lua" # from [aab50af65ba043424b85556957569396cf687c23] # to [bbc63d2f0a50efd11f1e388d1306b2d25d418fec] # # patch "tests/use_inodeprints_hook/__driver__.lua" # from [c255d6fc43f357012270f972a7bd4f485c41c776] # to [edd23a1d5d49ea8372a7be7b494af24d19275b9f] # # patch "tests/workspace_migration/__driver__.lua" # from [50f17508a5202fd16f9dd1db9c46b69413b101e9] # to [de48548e28d94efe72581fcac617e0dee13764b1] # # patch "tests/workspace_migration/basic.lua" # from [04c86f17abd3d575bee28d3f3152b9f899ac4b35] # to [eacceaf4c9c35b49cebc1e90edcc359393fc1b94] # # patch "tests/workspace_migration/inodeprints.lua" # from [57960c6f4766c6ed3cad53c6436f4922d7c75895] # to [9c9376fe3aa32f08c5a7fa4cb2d84d570c11ba75] # # patch "tests/workspace_migration/twoparent.lua" # from [581c3f3571a87e4d2ab8d43f204974f31ee6c425] # to [ab7877e07e063754142a32599611dc58cd92a2a4] # ============================================================ --- lua-testsuite.lua 4fda3918cfc0ae28563bde4675c1345a251a540d +++ lua-testsuite.lua d8a7c77a64eeb8d26f4546e6fd6a7eabc55ad89b @@ -99,7 +99,7 @@ function probe_node(filename, rsha, fsha remove("_MTN.old") rename("_MTN", "_MTN.old") remove(filename) - check(mtn("checkout", "--revision", rsha, "."), 0, false, true) + check(mtn_no_ws("checkout", "--revision", rsha, "."), 0, false, true) rename("_MTN.old/options", "_MTN") check(base_revision() == rsha) check(sha1(filename) == fsha) @@ -164,12 +164,15 @@ end check(mt("add", dirname), 0, false, false) end -function revert_to(rev, branch, mt) +function revert_to(rev, branch, mt, mt_no_ws) if type(branch) == "function" then + -- allow calling as (rev, mt, mt_no_ws) mt = branch + mt_no_ws = mt branch = nil end if mt == nil then mt = mtn end + if mt_no_ws == nil then mt_no_ws = mtn_no_ws end check(mt("automate", "get_manifest_of", base_revision()), 0, true, false) rename("stdout", "paths-new") @@ -177,7 +180,7 @@ function revert_to(rev, branch, mt) remove("_MTN.old") rename("_MTN", "_MTN.old") - check(mt("automate", "get_manifest_of", rev), 0, true, false) + check(mt_no_ws("automate", "get_manifest_of", rev), 0, true, false) rename("stdout", "paths-old") -- remove all of the files and dirs in this @@ -216,9 +219,9 @@ function revert_to(rev, branch, mt) end if branch == nil then - check(mt("checkout", "--revision", rev, "."), 0, false, true) + check(mt_no_ws("checkout", "--revision", rev, "."), 0, false, true) else - check(mt("checkout", "--branch", branch, "--revision", rev, "."), 0, false, true) + check(mt_no_ws("checkout", "--branch", branch, "--revision", rev, "."), 0, false, true) end check(base_revision() == rev) end ============================================================ --- tests/automate_roots/__driver__.lua 13ab764570fb854374d4c2310dff78cfd7977371 +++ tests/automate_roots/__driver__.lua 59642b271e5d92f125f8ac30ec8374eff08031c6 @@ -24,7 +24,7 @@ remove("_MTN") -- now, make a new branch remove("testfile") remove("_MTN") -check(mtn("setup", "--branch=otherbranch", "."), 0, false, false) +check(mtn_no_ws("setup", "--branch=otherbranch", "."), 0, false, false) -- and add something there addfile("otherfile", "blah blah") ============================================================ --- tests/cat_-r_REV_PATH/__driver__.lua 1a7604541146055aabc8e19bfe8847515e8ae599 +++ tests/cat_-r_REV_PATH/__driver__.lua 231db4a272fa18981c04ee5d34fcbcc57d39e520 @@ -36,8 +36,8 @@ remove("_MTN") remove("_MTN") -check(mtn("cat", "-r", revs[0], "testfile"), 0, true, false) +check(mtn_no_ws("cat", "-r", revs[0], "testfile"), 0, true, false) check(samefile("stdout", "r0testfile")) +check(mtn_no_ws("cat", "-r", revs[0], "no_such_file"), 1, false, false) +check(mtn_no_ws("cat", "-r", revs[0], ""), 1, false, false) -check(mtn("cat", "-r", revs[0], "no_such_file"), 1, false, false) -check(mtn("cat", "-r", revs[0], ""), 1, false, false) ============================================================ --- tests/checkout_without_--branch_sets_branch/__driver__.lua cb9454891ca21ada23cd35827a873403eb81a99b +++ tests/checkout_without_--branch_sets_branch/__driver__.lua 39b215c6e644c856d51d58f25d6d03f2fc3db24f @@ -16,8 +16,8 @@ remove("_MTN") -- but, now we can't checkout without a --branch... -- need to make sure don't pick up branch from our local _MTN dir... remove("_MTN") -check(mtn("checkout", "--revision", rev, "codir2"), 1, false, false) -check(mtn("checkout", "--revision", rev, "--branch=testbranch", "codir3"), 0, false, false) +check(mtn_no_ws("checkout", "--revision", rev, "codir2"), 1, false, false) +check(mtn_no_ws("checkout", "--revision", rev, "--branch=testbranch", "codir3"), 0, false, false) check(samefile("foo", "codir3/foo")) -check(mtn("checkout", "--revision", rev, "--branch=otherbranch", "codir4"), 0, false, false) +check(mtn_no_ws("checkout", "--revision", rev, "--branch=otherbranch", "codir4"), 0, false, false) check(samefile("foo", "codir4/foo")) ============================================================ --- tests/commit_with_--message-file/__driver__.lua c489098cf8e352319705e1965af1632d06f68316 +++ tests/commit_with_--message-file/__driver__.lua e072e0dc6c01d82f49e6a8c6e0909a252e8e02eb @@ -20,7 +20,7 @@ check(qgrep('this commit uses the --mess ---------------------- --also with a file coming outside the workspace ---------------------- -check(mtn("setup", "--branch=testbranch", "alt_wrk"), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "alt_wrk"), 0, false, false) writefile("alt_wrk/input1.txt", "files... files...") ============================================================ --- tests/common/netsync.lua 42a1fdb06317f8446d3374c40d46dd48bbe90e1c +++ tests/common/netsync.lua 5d662438454b0eef9d42e399db5af5053ca19376 @@ -1,8 +1,12 @@ end function mtn2(...) return mtn("--db=test2.db", "--keydir=keys2", unpack(arg)) end +function mtn2_no_ws(...) + return mtn_no_ws("--db=test2.db", "--keydir=keys2", unpack(arg)) +end + function mtn3(...) return mtn("--db=test3.db", "--keydir=keys3", unpack(arg)) end @@ -65,7 +69,10 @@ function netsync.start(opts, n, min) else table.insert(args, "--rcfile=netsync.lua") end - if n ~= nil then + if n == nil then + table.insert(args, "--keydir=keys") + table.insert(args, "--db=test.db") + else table.insert(args, "--keydir=keys"..n) table.insert(args, "--db=test"..n..".db") end @@ -112,6 +119,9 @@ function netsync.internal.run(oper, pat, function netsync.internal.run(oper, pat, opts) local srv = netsync.start(opts) if type(opts) == "table" then + if type(pat) ~= "table" then + err("first argument to netsync."..oper.." should be a table when second argument is present") + end for k, v in pairs(opts) do table.insert(pat, v) end ============================================================ --- tests/conflict_messages/__driver__.lua 4294e488db07d33260abd6ab276fc85d9c2dd508 +++ tests/conflict_messages/__driver__.lua a8cbfe5bd1655a84334c68bd65a5be4aaa40cd32 @@ -10,7 +10,7 @@ function setup(branch) remove("bar") remove("baz") remove(branch) - check(mtn("setup", ".", "--branch", branch), 0, false, false) + check(mtn_no_ws("setup", ".", "--branch", branch), 0, false, false) end ============================================================ --- tests/delete_work_file_on_checkout/__driver__.lua 50b8a6cb1349cd4d275d0431471b929363c79303 +++ tests/delete_work_file_on_checkout/__driver__.lua aa49c29bfcf89ea93eacf5441306930d2249ad0c @@ -9,5 +9,5 @@ remove("testfile0") check(qgrep("add_file","_MTN/revision")) remove("_MTN") remove("testfile0") -check(mtn("checkout", "--revision", v1, "."), 0, false, false) +check(mtn_no_ws("checkout", "--revision", v1, "."), 0, false, false) check(not qgrep("add_file","_MTN/revision")) ============================================================ --- tests/diffing_a_file_within_revision_outside_a_workspace/__driver__.lua b6b86da2a8eaec31c668e1ffa438d80e82982752 +++ tests/diffing_a_file_within_revision_outside_a_workspace/__driver__.lua fd4b16ad1fd1d3d2bc27b9bbf3761a3bf9b3f5ff @@ -13,9 +13,9 @@ remove("_MTN") second = base_revision() remove("_MTN") -check(mtn("diff", "--revision", parent, "--revision", second), 0, false, false) +check(mtn_no_ws("diff", "--revision", parent, "--revision", second), 0, false, false) -- check it works when specifying files -check(mtn("diff", "--revision", parent, "--revision", second, "foo2"), 0, false, false) +check(mtn_no_ws("diff", "--revision", parent, "--revision", second, "foo2"), 0, false, false) -- should work without any --root argument, too. we do this in a -- special temporary directory to ensure no risk to a higher-level @@ -25,7 +25,7 @@ copy(test.root .. "/keys", tmpdir) copy(test.root .. "/test.db", tmpdir) copy(test.root .. "/keys", tmpdir) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, @@ -33,7 +33,7 @@ check(indir(tmpdir, "diff", "--revision", parent, "--revision", second }), 0, false, false) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--root="..tmpdir, "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, @@ -41,7 +41,7 @@ check(indir(tmpdir, "diff", "--revision", parent, "--revision", second }), 0, false, false) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--root=.", "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, @@ -49,7 +49,7 @@ check(indir(tmpdir, "diff", "--revision", parent, "--revision", second }), 0, false, false) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, @@ -57,7 +57,7 @@ check(indir(tmpdir, "diff", "--revision", parent, "--revision", second, "foo2" }), 0, false, false) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--root="..tmpdir, "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, @@ -65,7 +65,7 @@ check(indir(tmpdir, "diff", "--revision", parent, "--revision", second, "foo2" }), 0, false, false) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--root=.", "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, ============================================================ --- tests/dump_on_crash/__driver__.lua 318446527188e10853add4d6c9b7b82f450f34c8 +++ tests/dump_on_crash/__driver__.lua c2bb0d181c73f50ef66ca3fe89d49de76ee0b836 @@ -5,14 +5,14 @@ check(remove("_MTN")) check(exists("_MTN/debug")) check(remove("_MTN")) -check(mtn("crash", "I"), 3, false, false) +check(mtn_no_ws("crash", "I"), 3, false, false) check(exists("dump")) mkdir("try") -check(mtn("crash", "I", "--confdir=try"), 3, false, false) +check(mtn_no_ws("crash", "I", "--confdir=try"), 3, false, false) check(exists("try/dump")) -check(mtn("crash", "I", "--dump=fork"), 3, false, false) +check(mtn_no_ws("crash", "I", "--dump=fork"), 3, false, false) check(exists("fork")) -- all the exceptions caught in monotone.cc and translated to error messages @@ -30,19 +30,19 @@ for _,tag in pairs({ 'std::bad_cast', 'std::runtime_error', 'std::exception' }) do remove("fork") - check(mtn("crash", tag, "--dump=fork"), 3, false, false) + check(mtn_no_ws("crash", tag, "--dump=fork"), 3, false, false) check(exists("fork")) end -- bad_alloc is special remove("fork") -check(mtn("crash", "std::bad_alloc", "--dump=fork"), 1, false, false) +check(mtn_no_ws("crash", "std::bad_alloc", "--dump=fork"), 1, false, false) check(not exists("fork")) -- selected signals - note hardwired signal numbers :( skip_if(ostype == "Windows") remove("fork") for _,tag in pairs({ 3, 6, 11 }) do - check(mtn("crash", tag, "--dump=fork"), -tag, false, false) + check(mtn_no_ws("crash", tag, "--dump=fork"), -tag, false, false) check(not exists("fork")) end ============================================================ --- tests/empty_string_as_a_path_name/__driver__.lua 27e2081cdc69c569f84956584692067953ce3aac +++ tests/empty_string_as_a_path_name/__driver__.lua c14c1b9da9c750cbea2841d7041a549bc14ae46c @@ -6,7 +6,7 @@ mkdir("foo") rev = base_revision() mkdir("foo") -check(indir("foo", mtn("setup", "--branch=testbranch", "")), 1, false, false) +check(indir("foo", mtn_no_ws("setup", "--branch=testbranch", "")), 1, false, false) check(indir("foo", mtn("checkout", "--revision", rev, "")), 1, false, false) check(indir("foo", mtn("checkout", "--branch=testbranch", "")), 1, false, false) ============================================================ --- tests/include()_includedir()_and_includedirpattern()_lua_functions/__driver__.lua 9d0df9b28dc88e4ede507dabe7864595afd8b7d1 +++ tests/include()_includedir()_and_includedirpattern()_lua_functions/__driver__.lua 329bde15df65b6daed069edf3bffc009060969d3 @@ -14,7 +14,7 @@ check(get("bbb.zz", "gongolo/bbb.zz")) check(get("bbb.zz", "gongolo/bbb.zz")) -- setup a wrk dir -check(mtn("setup", "--branch=testbranch", "alt_wrk"), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "alt_wrk"), 0, false, false) -- include directly a single file check(indir("alt_wrk", mtn("--root=.", "--rcfile=../include.lua", "status")), 0, true, false) ============================================================ --- tests/logging_a_file_within_revision_outside_a_workspace/__driver__.lua 2f16087b6cfdba6e097f3a0f27918c64332ea4a7 +++ tests/logging_a_file_within_revision_outside_a_workspace/__driver__.lua 682f400983cd9b3919d479f5e4b71a99abf29192 @@ -9,7 +9,7 @@ remove("_MTN") rev = base_revision() remove("_MTN") -check(mtn("log", "--from", rev, "foo1"), 0, false, false) +check(mtn_no_ws("log", "--from", rev, "foo1"), 0, false, false) -- should work without any --root argument, too. we do this in a -- special temporary directory to ensure no risk to a higher-level @@ -19,7 +19,7 @@ copy(test.root .. "/keys", tmpdir) copy(test.root .. "/test.db", tmpdir) copy(test.root .. "/keys", tmpdir) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, @@ -27,7 +27,7 @@ check(indir(tmpdir, "log", "--from", rev, "foo1" }), 0, false, false) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--root="..tmpdir, "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, @@ -35,7 +35,7 @@ check(indir(tmpdir, "log", "--from", rev, "foo1" }), 0, false, false) -check(indir(tmpdir, +check(indir(tmpdir, { monotone_path, "--norc", "--root=.", "--db="..tmpdir.."/test.db", "--confdir="..tmpdir, ============================================================ --- tests/lua_function_existsonpath/__driver__.lua fdf4def430dfd205c6e04ca774d35b7d0eeb9bcd +++ tests/lua_function_existsonpath/__driver__.lua 4650b71b55c0f965b543d7761738f41b76bc6ce9 @@ -1,7 +1,7 @@ check(get("test.lua")) mtn_setup() check(get("test.lua")) -check(mtn("setup", "--rcfile=test.lua", "--branch=testbranch", "subdir"), 0, true, false) +check(mtn_no_ws("setup", "--rcfile=test.lua", "--branch=testbranch", "subdir"), 0, true, false) check(qgrep("asdfghjkl", "stdout")) check(qgrep("qwertyuiop", "stdout")) ============================================================ --- tests/merge_conflict_with_no_lca/__driver__.lua 024b58c36ab28c05edd9e308451863c3ae3852be +++ tests/merge_conflict_with_no_lca/__driver__.lua 4817dc9fe6889c9e8ecf0d22ae18fbd4835b9d30 @@ -6,7 +6,7 @@ remove("_MTN") addfile("bar", "bar") commit("otherbranch") remove("_MTN") -check(mtn("setup", ".", "-b", "testbranch"), 0, false, false) +check(mtn_no_ws("setup", ".", "-b", "testbranch"), 0, false, false) addfile("foo", "foo\n") commit() base = base_revision() ============================================================ --- tests/merging_(add_a)_with_(add_a,_drop_a)/__driver__.lua 95963fea52aff5dbd3ac034f8792f70ba9c6485e +++ tests/merging_(add_a)_with_(add_a,_drop_a)/__driver__.lua 32036d35cc0b091281839a72dc8a090720426d09 @@ -11,9 +11,9 @@ mtn_setup() -- B -- B and D are heads of branch.main and branch.fork respectively, we want to --- "propagate branch.main branch.fork". +-- "propagate branch.main branch.fork". --- The revs F, C, and D are members of branch.fork. +-- The revs F, C, and D are members of branch.fork. -- A, C, E, G, and B are members of branch.main (C is shared) -- C is "add bar", E is "drop bar", other revisions involve non-conflicting @@ -69,7 +69,7 @@ remove("quux") remove("foo") remove("iced") remove("quux") -check(mtn("--branch=branch.fork", "checkout", "."), 0, false, true) +check(mtn_no_ws("--branch=branch.fork", "checkout", "."), 0, false, true) check(mtn("automate", "get_manifest_of"), 0, true) rename("stdout", "manifest") ============================================================ --- tests/merging_adds_in_unrelated_revisions/__driver__.lua 1c368783de0067313a53b09df6cc9da2f743a385 +++ tests/merging_adds_in_unrelated_revisions/__driver__.lua 8a8e8bd3b48ab62b05272a27b8c0651fb2ca411b @@ -9,7 +9,7 @@ remove("_MTN") left = base_revision() remove("_MTN") -check(mtn("setup", "--branch=testbranch", "."), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "."), 0, false, false) addfile("testfile2", "This is test file 2\n") commit() ============================================================ --- tests/merging_data_in_unrelated_revisions/__driver__.lua 3cbfd34cc92b252f69183b0f29a9b491b3238296 +++ tests/merging_data_in_unrelated_revisions/__driver__.lua fe2c5e9addc18d0cd60b92844cdfc5d09b143e05 @@ -9,7 +9,7 @@ remove("_MTN") left = base_revision() remove("_MTN") -check(mtn("setup", "--branch=testbranch", "."), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "."), 0, false, false) check(get("right", "testfile")) addfile("testfile") ============================================================ --- tests/mtn_add_dot/__driver__.lua 6858c894d4638b4b9c4dca9ed5e701a8a799918f +++ tests/mtn_add_dot/__driver__.lua 4cc65e24a5dd351506c01def5458261cd1d2f792 @@ -9,7 +9,7 @@ writefile("subdir/testdir1/subfile2", "q writefile("subdir/testdir1/subfile1", "baz") writefile("subdir/testdir1/subfile2", "quux") -check(mtn("setup", "--branch=testbranch", "subdir"), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "subdir"), 0, false, false) -- Make sure that "add ." works, even at the root of the tree chdir("subdir") ============================================================ --- tests/netsync_duplicate_keys/__driver__.lua 2836e143798cc5ec1eb8d1d02d7e0df54dd89ffc +++ tests/netsync_duplicate_keys/__driver__.lua 232c0e8e5333f6328b895f654cb2028d7b2ecb68 @@ -14,7 +14,7 @@ check(mtn("au", "select", "b:testbranch" check(mtn("au", "select", "b:testbranch"), 0, true) -srv:push("testbranch", 1) +srv:push({"address@hidden", "testbranch"}, 1) check(mtn("dropkey", "address@hidden"), 0, false, false) ============================================================ --- tests/netsync_epochs_are_not_sent_upstream_by_pull/__driver__.lua 4ec9d25eab337911fbab21281d28c945482a0ce6 +++ tests/netsync_epochs_are_not_sent_upstream_by_pull/__driver__.lua 85fa6315b5d58225d78bfa1e784937f2308237af @@ -17,4 +17,5 @@ netsync.pull("testbranch.*") netsync.pull("testbranch.*") +-- _MTN/options now has database test2.db, so need to specify dbs explicitly here +check_different_stdout(mtn("--db=test.db", "list", "epochs"), mtn2("list", "epochs")) -check_different_stdout{"list", "epochs"} ============================================================ --- tests/netsync_key_hook/__driver__.lua f2a9ed3d90567968db34e9c16c90e8a5d4991aef +++ tests/netsync_key_hook/__driver__.lua 301efa0ec3150bdc6a99830c6e037530fbe7229d @@ -13,7 +13,7 @@ get("client-hooks.lua") get("read-permissions") get("client-hooks.lua") -srv = netsync.start(2) +srv = netsync.start({"address@hidden"}, 2) -- We don't want the --key argument, so we have to do this ourselves. function client(what, ret) ============================================================ --- tests/netsync_permissions/__driver__.lua 9206b414713e9b678316304d3ce071543cc5433b +++ tests/netsync_permissions/__driver__.lua 3e9210e105be3808297336d8cc6a4bf7a91d1008 @@ -36,7 +36,7 @@ srv = netsync.start({"--confdir=open"}, srv = netsync.start({"--confdir=open"}, nil, true) --- anonymous pull +-- anonymous pull clean(2) @@ -71,41 +71,42 @@ copy("keys", "keys2") copy("test.db", "test2.db") remove("keys2") copy("keys", "keys2") -revert_to(revs.base, mtn2) +revert_to(revs.base, mtn2, mtn2_no_ws) addfile("default", "default", mtn2) -check(mtn2("commit", "--message", "default"), 0, false, false) +check(mtn2("commit", "address@hidden", "--message", "default"), 0, false, false) revs.default = base_revision() srv:push("testbranch") -- push with other key -revert_to(revs.base, mtn2) +revert_to(revs.base, mtn2, mtn2_no_ws) addfile("other", "other", mtn2) -check(mtn2("commit", "--message", "other"), 0, false, false) +check(mtn2("commit", "address@hidden", "--message", "other"), 0, false, false) revs.other = base_revision() srv:push({"testbranch", "--key", keys.other}) -- push with unknown key fails -revert_to(revs.base, mtn2) +revert_to(revs.base, mtn2, mtn2_no_ws) addfile("unknown", "unknown", mtn2) -check(mtn2("commit", "--message", "unknown"), 0, false, false) +check(mtn2("commit", "address@hidden", "--message", "unknown"), 0, false, false) revs.unknown = base_revision() genkey(keys.unknown, mtn2) srv:push({"testbranch", "--key", keys.unknown}, nil, 1) srv:stop() -check(mtn("automate", "get_revision", revs.default), 0, true, true) -check(mtn("automate", "get_revision", revs.other), 0, true, true) -check(mtn("automate", "get_revision", revs.unknown), 1, true, true) +-- _MTN/options has database = test2.db; we want to check test.db +check(mtn("--db=test.db", "automate", "get_revision", revs.default), 0, true, true) +check(mtn("--db=test.db", "automate", "get_revision", revs.other), 0, true, true) +check(mtn("--db=test.db", "automate", "get_revision", revs.unknown), 1, true, true) -- test with closed security settings check(get("closed")) clean() -writefile("_MTN/revision", +writefile("_MTN/revision", "format_version \"1\"\n\n".. "new_manifest []\n\n".. "old_revision []\n") @@ -157,7 +158,7 @@ copy("keys", "keys2") copy("test.db", "test2.db") remove("keys2") copy("keys", "keys2") -revert_to(revs.base, mtn2) +revert_to(revs.base, mtn2, mtn2_no_ws) addfile("default", "default", mtn2) check(mtn2("commit", "--message", "default"), 0, false, false) revs.default = base_revision() @@ -165,7 +166,7 @@ srv:push("testbranch") -- push with other key -revert_to(revs.base, mtn2) +revert_to(revs.base, mtn2, mtn2_no_ws) addfile("other", "other", mtn2) check(mtn2("commit", "--message", "other"), 0, false, false) revs.other = base_revision() @@ -173,7 +174,7 @@ srv:push({"testbranch", "--key", keys.ot -- push with unknown key fails -revert_to(revs.base, mtn2) +revert_to(revs.base, mtn2, mtn2_no_ws) addfile("unknown", "unknown", mtn2) check(mtn2("commit", "--message", "unknown"), 0, false, false) revs.unknown = base_revision() ============================================================ --- tests/netsync_permissions_wildcards/__driver__.lua 04dbe62bca9496f4b6385d2d0e7a412b018d084d +++ tests/netsync_permissions_wildcards/__driver__.lua 9a490526d06fbbcbc05a294fd3105f82e641c181 @@ -20,8 +20,10 @@ srv = netsync.start({"--confdir=."}, 2, srv = netsync.start({"--confdir=."}, 2, false) -- Try pushing just branches matching a wild card -addfile("testfile2", "test file 2") -commit("testbranch", "testfile") + +-- 'mtn2("update") has set _MTN/options database to test2.db, but we want to add and commit to test.db +addfile("testfile2", "test file 2", mtn_no_ws) +commit("testbranch", "testfile", mtn_no_ws) srv:push("testbra*", 1) srv:stop() ============================================================ --- tests/netsync_server_absorbs_and_checks_epochs/__driver__.lua cc83b2b114c4065c65f166c731e7b9090892bf83 +++ tests/netsync_server_absorbs_and_checks_epochs/__driver__.lua 489c7cc289dfbc7c3451441b1a90f037dcea359b @@ -26,10 +26,12 @@ netsync.push("testbranch") srv:finish() -- Run the real netsync netsync.push("testbranch") -check(mtn("list", "epochs"), 0, true, false) + +-- _MTN/options has database test2.db; we need to check test.db +check(mtn("--db=test.db", "list", "epochs"), 0, true, false) rename("stdout", "new-epochs") check(samefile("orig-epochs", "new-epochs")) -check_different_stdout{"list", "epochs"} +check_different_stdout(mtn("--db=test.db", "list", "epochs"), mtn2("list", "epochs")) writefile("testfile", "new version of data") check(mtn2("commit", "--message=foo", "--branch=testbranch"), 0, false, false) @@ -39,7 +41,7 @@ check(mtn("db", "set_epoch", "otherbranc check(mtn("db", "set_epoch", "testbranch", string.rep("a", 40)), 0, false, false) check(mtn("db", "set_epoch", "otherbranch", string.rep("a", 40)), 0, false, false) --- this should *fail* to sync +-- this should *fail* to sync srv = netsync.start() -- This should probably expect an exit value of 1, but ATM the netsync -- client doesn't report errors in its exit value. @@ -51,7 +53,7 @@ check(qgrep("testbranch", "stdout")) check(qgrep("testbranch", "stdout")) check(mtn2("list", "epochs"), 0, true) check(qgrep("testbranch", "stdout")) -check_different_stdout{"list", "epochs"} +check_different_stdout(mtn("--db=test.db", "list", "epochs"), mtn2("list", "epochs")) -- confirm, we did not get the new revision +check(mtn("--db=test.db", "automate", "get_revision", revs[1]), 1, false, false) -check(mtn("automate", "get_revision", revs[1]), 1, false, false) ============================================================ --- tests/netsync_transfers_public_keys/__driver__.lua 7c33043f7bea601ceb114aa57853ca0ecdbbdcca +++ tests/netsync_transfers_public_keys/__driver__.lua 9edcd76fa4d5f2e9527397bd580bb50670b4116b @@ -14,7 +14,8 @@ commit("testbranch") addfile("testfile", "version 0 of test file") commit("testbranch") -netsync.pull("testbranch") +-- We have multiple keys, so we need to specify one for authorization +netsync.pull({"testbranch"}, {"address@hidden"}) check(mtn2("ls", "keys"), 0, true, false) check(not qgrep(pubkey, "stdout")) @@ -34,7 +35,7 @@ check(mtn("--branch=testbranch", "--mess check(mtn("--branch=testbranch", "--message=blah-blah", "address@hidden", "commit"), 0, false, false) -netsync.pull("testbranch") +netsync.pull({"testbranch"}, {"address@hidden"}) check(mtn2("ls", "keys"), 0, true, false) check(qgrep(pubkey, "stdout")) ============================================================ --- tests/netsync_verifies_server_keys/__driver__.lua 1faebbe461222b8dcf29847c982088237c12cd17 +++ tests/netsync_verifies_server_keys/__driver__.lua 1f58fbdbdfbfa06c2957894da05954751e58d6a6 @@ -10,13 +10,15 @@ math.randomseed(seed) -- started it picks a new random port. seed = get_pid() math.randomseed(seed) -netsync.pull("testbranch") +-- We have multiple keys, so we need to specify one for authorization +netsync.pull({"testbranch"}, {"address@hidden"}) + -- Then again with a different key; should fail. math.randomseed(seed) srv = netsync.start{"address@hidden"} -srv:pull("testbranch", nil, 1) +srv:pull({"testbranch", "address@hidden"}, 2, 1) -- {pattern, opts}, n, result -- It shouldn't have absorbed the key, either. check(mtn2("pubkey", "address@hidden"), 1, true, false) @@ -24,7 +26,7 @@ check(mtn2("unset", "known-servers", srv check(mtn2("unset", "known-servers", srv.address), 0, false, false) -- Now it should succeed -srv:pull("testbranch") +srv:pull({"testbranch", "address@hidden"}, 2) -- {pattern, opts}, n -- And have absorbed the key check(mtn2("pubkey", "address@hidden"), 0, true, false) ============================================================ --- tests/netsync_with_globs/__driver__.lua 9e790fb1196c3ee5cb391cbdcbae847e721e4044 +++ tests/netsync_with_globs/__driver__.lua 1bd6a216c54f39f54535e33359fbcc1b52e14c6e @@ -9,13 +9,13 @@ remove("_MTN") revs[11] = base_revision() remove("_MTN") -check(mtn("setup", "--branch=testbranch", ".")) +check(mtn_no_ws("setup", "--branch=testbranch", ".")) addfile("testfile", "bar") commit("1branch2") revs[12] = base_revision() remove("_MTN") -check(mtn("setup", "--branch=testbranch", ".")) +check(mtn_no_ws("setup", "--branch=testbranch", ".")) addfile("testfile", "baz") commit("2branch1") revs[21] = base_revision() ============================================================ --- tests/one-way_netsync_where_the_sink_has_more_epochs/__driver__.lua bb8e382b933199a1949323f0d4005db68b6d17bf +++ tests/one-way_netsync_where_the_sink_has_more_epochs/__driver__.lua 1d668c0b1614aad74af95e3638b47cde88092cbb @@ -27,6 +27,7 @@ srv:stop() check(cli:wait(20)) -- give it 20 seconds. srv:stop() -check(mtn("ls", "branches"), 0, true, false) +-- _MTN/options has database test2.db +check(mtn("--db=test.db", "ls", "branches"), 0, true, false) check(qgrep("testbranch", "stdout"), 0, false, false) check(qgrep("otherbranch", "stdout"), 0, false, false) ============================================================ --- tests/persistent_netsync_server_-_keys/__driver__.lua d9a6a5c55dc85ad55f06cb316dc4231ada807e93 +++ tests/persistent_netsync_server_-_keys/__driver__.lua d64132ad0bbe6afd67e3172639cc50a57e0c294d @@ -20,8 +20,9 @@ check(mtn2("commit", "--branch=testbranc writefile("testfile", "stuffty stuffty") check(mtn2("commit", "--branch=testbranch", "--message=foo", "address@hidden"), 0, false, false) -srv:push("testbranch", 2) -srv:pull("testbranch", 3) +-- _MTN/options has key "address@hidden" +srv:push({"address@hidden", "testbranch"}, 2) +srv:pull({"address@hidden", "testbranch"}, 3) srv:finish() ============================================================ --- tests/persistent_netsync_server_-_revs_&_certs/__driver__.lua ae88e5fbf13f1c3b47befa86b9e0397e9b835f20 +++ tests/persistent_netsync_server_-_revs_&_certs/__driver__.lua e883a9db42e7012b48a01fb7d738f127c206d0e9 @@ -19,8 +19,9 @@ srv = netsync.start() srv = netsync.start() -srv:sync("testbranch", 2) -srv:sync("testbranch", 3) +-- _MTN/options has no key +srv:sync({"address@hidden", "testbranch"}, 2) +srv:sync({"address@hidden", "testbranch"}, 3) function chksy(n, co_mtn) check_same_stdout(mtn2("automate", "get_revision", revs[n]), @@ -33,7 +34,7 @@ chksy(1, mtn3) chksy(1, mtn3) -srv:sync("testbranch", 2) +srv:sync({"address@hidden", "testbranch"}, 2) chksy(2, mtn2) -- And now make sure it works for children, where there are diffs and all @@ -52,8 +53,8 @@ check(mtn3("comment", revs[1], 'sorry da -- And add a cert on an old revision check(mtn3("comment", revs[1], 'sorry dave'), 0, false, false) -srv:sync("testbranch", 3) -srv:sync("testbranch", 2) +srv:sync({"address@hidden", "testbranch"}, 3) +srv:sync({"address@hidden", "testbranch"}, 2) chksy(3, mtn2) @@ -61,7 +62,7 @@ check_same_stdout(mtn2("ls", "certs", re check_same_stdout(mtn2("ls", "certs", revs[1]), mtn3("ls", "certs", revs[1])) -srv:sync("testbranch", 3) +srv:sync({"address@hidden", "testbranch"}, 3) chksy(4, mtn3) ============================================================ --- tests/pivot_root/__driver__.lua 74d3f9a78052165a356b5958f1119f2309038a4c +++ tests/pivot_root/__driver__.lua 48b8380d0b147e15fc6aabb0ceb0c17db5a723b4 @@ -12,7 +12,7 @@ mkdir("workspace") -- then make sure --execute puts things in the right place... mkdir("workspace") -check(indir("workspace", mtn("setup", ".", "-b", "testbranch")), 0, false, false) +check(indir("workspace", mtn_no_ws("setup", ".", "-b", "testbranch")), 0, false, false) mkdir("workspace/dir1") mkdir("workspace/dir1/dir2") ============================================================ --- tests/pivot_root_to_new_dir/__driver__.lua 1aced95b97d46debcd4087b1624980c159de369f +++ tests/pivot_root_to_new_dir/__driver__.lua dd4b4b34dabcfe8458828840b5567c8c0f4671a1 @@ -1,9 +1,9 @@ mkdir("workspace") mtn_setup() -- pivot_root to a directory that hasn't been commited yet should work mkdir("workspace") -check(indir("workspace", mtn("setup", ".", "-b", "testbranch")), +check(indir("workspace", mtn_no_ws("setup", ".", "-b", "testbranch")), 0, false, false) writefile("workspace/file1", "blah blah") ============================================================ --- tests/reverting_a_pivot_root/__driver__.lua 36d99a86c367367863e36a2af9d0911543d074f6 +++ tests/reverting_a_pivot_root/__driver__.lua a0f3e8bea99fb1035012ba68791e60e91551ed07 @@ -6,7 +6,7 @@ mkdir("workspace") -- job cleaning up after renames? mkdir("workspace") -check(indir("workspace", mtn("setup", ".", "-b", "testbranch")), 0, false, false) +check(indir("workspace", mtn_no_ws("setup", ".", "-b", "testbranch")), 0, false, false) mkdir("workspace/dir1") mkdir("workspace/dir1/dir2") ============================================================ --- tests/selecting_arbitrary_certs/__driver__.lua 7983b55fd4facf13866cec15c72f0791524054c1 +++ tests/selecting_arbitrary_certs/__driver__.lua ec74a911ba83789eb5e38a76c881d70cce6239ae @@ -38,10 +38,10 @@ remove("testfile") -- Check that exact value succeed... remove("_MTN") remove("testfile") -check(mtn("co", "--revision=c:testcert=value", "."), 0, false, false) +check(mtn_no_ws("co", "--revision=c:testcert=value", "."), 0, false, false) check(samefile("testfile", "testfile2")) remove("_MTN") remove("testfile") -check(mtn("co", "--revision=c:testcert=value=with=equal=signs", "."), 0, false, false) +check(mtn_no_ws("co", "--revision=c:testcert=value=with=equal=signs", "."), 0, false, false) check(samefile("testfile", "testfile1")) ============================================================ --- tests/setup_checkout_touch_new__MTN_options_only/__driver__.lua 98c2f1c859423898fa990c69333ebd521a2caf0f +++ tests/setup_checkout_touch_new__MTN_options_only/__driver__.lua 034891fefe9c3bfa27dbf5f6685911fb8a8016b7 @@ -7,7 +7,7 @@ commit() -- okay, now wd is on testbranch -- setup a dir on otherbranch and make sure we stay on testbranch -check(mtn("setup", "setupdir", "--branch=otherbranch"), 0, false, false) +check(mtn_no_ws("setup", "setupdir", "--branch=otherbranch"), 0, false, false) writefile("foo", "stuff stuff") check(mtn("commit", "--message=foo"), 0, false, false) check(mtn("automate", "heads", "testbranch"), 0, true, false) ============================================================ --- tests/setup_in_subdirectory/__driver__.lua 5634b3a59b8c6c46bfe3d11ece82d2a856146dd5 +++ tests/setup_in_subdirectory/__driver__.lua 6e78e0b0386dd38f537eeb3d32321a635ffe2e44 @@ -1,8 +1,8 @@ mtn_setup() mtn_setup() -- Set up a project -check(mtn("setup", "--branch=testbranch", "foo"), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "foo"), 0, false, false) -- Then set up another project in a subdirectory without giving a database -- or branch. mtn SHOULD fail on this. ============================================================ --- tests/setup_on_existing_path/__driver__.lua 1ecc80aafde9b8410627cb08aad586dffe3721e0 +++ tests/setup_on_existing_path/__driver__.lua 95058e096b5c2dc79a90998f2778e4e29e735131 @@ -1,10 +1,10 @@ writefile("foo", "blah blah") mtn_setup() writefile("foo", "blah blah") -check(mtn("setup", "--branch=testbranch", "foo"), 1, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "foo"), 1, false, false) mkdir("bar") -check(mtn("setup", "--branch=testbranch", "bar"), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "bar"), 0, false, false) check(exists("bar/_MTN")) remove("bar/_MTN") +check(indir("bar", mtn_no_ws("setup", "--branch=testbranch")), 0, false, false) -check(indir("bar", mtn("setup", "--branch=testbranch")), 0, false, false) ============================================================ --- tests/single_character_filename_support/__driver__.lua 1838b034aea2dbb2128ef03412223ff720c378a0 +++ tests/single_character_filename_support/__driver__.lua 3f883f7d20188ab3ff1fc06a3a99a00aecc58726 @@ -20,7 +20,7 @@ for _,x in pairs{{revs.a, true, false}, {revs.b, false, true}, {revs.null, false, false}} do remove("_MTN") - check(mtn("checkout", "--revision", x[1], "co-dir"), 0, false, false) + check(mtn_no_ws("checkout", "--revision", x[1], "co-dir"), 0, false, false) check(exists("co-dir/a") == x[2]) check(exists("co-dir/b") == x[3]) remove("co-dir") ============================================================ --- tests/sticky_branches/__driver__.lua ed9188c29ff7be00e5ea2b7cde67b17432f8adda +++ tests/sticky_branches/__driver__.lua 472fba176285d5b85d6672ed2a089772d96984fa @@ -1,8 +1,8 @@ mtn_setup() mtn_setup() -- setup saves given branch -check(mtn("setup", "setupdir", "--branch=testbranch"), 0, false, false) +check(mtn_no_ws("setup", "setupdir", "--branch=testbranch"), 0, false, false) writefile("setupdir/foo", "blah blah") check(indir("setupdir", mtn("add", "foo")), 0, false, false) check(indir("setupdir", mtn("commit", "--message=foo")), 0, false, false) ============================================================ --- tests/tags_and_tagging_of_revisions/__driver__.lua 417a74a8f678051c254c7fc3a041d9f703987239 +++ tests/tags_and_tagging_of_revisions/__driver__.lua 1b0b72cb854c7be6d3a35f10d3f68fd03bbd8e5d @@ -53,8 +53,8 @@ for i,x in pairs({{true, false, false}, remove("file1") remove("file2") remove("file3") - - check(mtn("co", "--revision=tag"..i, "."), 0, false, false) + + check(mtn_no_ws("co", "--revision=tag"..i, "."), 0, false, false) check(base_revision() == revs[i]) for j = 1,3 do check(exists("file"..j) == x[j]) ============================================================ --- tests/two_parent_workspace_pivot_root/__driver__.lua 4cd99ef70412ee23cc86fcd2b6dce7a2c49c2bb0 +++ tests/two_parent_workspace_pivot_root/__driver__.lua d0ca29e1a43e58f24e9bf893914e9c3f5257ed01 @@ -1,8 +1,8 @@ mkdir("w1") mtn_setup() mkdir("w1") -check(indir("w1", mtn("setup", ".", "-b", "testbranch")), 0, false, false) +check(indir("w1", mtn_no_ws("setup", ".", "-b", "testbranch")), 0, false, false) writefile("w1/testfile", "ancestor\nancestor") mkdir("w1/newroot") ============================================================ --- tests/update_does_not_stomp_non-monotone_files/__driver__.lua 72480446e72630b71f4fea0d2fc58d043e2cab9a +++ tests/update_does_not_stomp_non-monotone_files/__driver__.lua c31f6d2557801d5c5eafc8734599042b3e1c4ed8 @@ -18,7 +18,7 @@ copy("initial", "alicewd/initial") -- Alice make project, writes foo, but doesn't check it in mkdir("alicewd") copy("initial", "alicewd/initial") -check(mtn("--branch=testbranch", "setup", "alicewd"), 0, false, false) +check(mtn_no_ws("--branch=testbranch", "setup", "alicewd"), 0, false, false) check(indir("alicewd", mtn("--root=.", "add", "initial")), 0, false, false) check(indir("alicewd", mtn("--branch=testbranch", "--root=.", "commit", "-m", 'initial commit')), 0, false, false) copy("foo.alice", "alicewd/foo") ============================================================ --- tests/update_with_blocked_rename/__driver__.lua a93e2215543253fb346e4a9804c75467486769fd +++ tests/update_with_blocked_rename/__driver__.lua 41ee460a7cbe01fca2e9f2753da0bf247e00e28d @@ -17,7 +17,7 @@ mkdir("alice") mkdir("alice") -- Alice starts a projectand creates foo -check(mtn("--branch=testbranch", "setup", "alice"), 0, false, false) +check(mtn_no_ws("--branch=testbranch", "setup", "alice"), 0, false, false) for i = 1,10 do writefile("alice/file."..i, "file "..i) check(indir("alice", mtn("add", "file."..i)), 0, false, false) ============================================================ --- tests/updating_through_a_pivot_root/__driver__.lua aab50af65ba043424b85556957569396cf687c23 +++ tests/updating_through_a_pivot_root/__driver__.lua bbc63d2f0a50efd11f1e388d1306b2d25d418fec @@ -1,8 +1,8 @@ mkdir("workspace") mtn_setup() mkdir("workspace") -check(indir("workspace", mtn("setup", "-b", "testbranch")), 0, false, false) +check(indir("workspace", mtn_no_ws("setup", "-b", "testbranch")), 0, false, false) mkdir("workspace/dir1") writefile("workspace/old_root_file", "I'm in the root to start off with!") ============================================================ --- tests/use_inodeprints_hook/__driver__.lua c255d6fc43f357012270f972a7bd4f485c41c776 +++ tests/use_inodeprints_hook/__driver__.lua edd23a1d5d49ea8372a7be7b494af24d19275b9f @@ -9,17 +9,17 @@ rev = base_revision() commit() rev = base_revision() -check(mtn("setup", "--branch=testbranch", "setup_default"), 0, false, false) +check(mtn_no_ws("setup", "--branch=testbranch", "setup_default"), 0, false, false) check(not exists("setup_default/_MTN/inodeprints")) check(mtn("checkout", "--revision", rev, "co_default"), 0, false, false) check(not exists("co_default/_MTN/inodeprints")) -check(mtn("--rcfile=off.lua", "setup", "--branch=testbranch", "setup_off"), 0, false, false) +check(mtn_no_ws("--rcfile=off.lua", "setup", "--branch=testbranch", "setup_off"), 0, false, false) check(not exists("setup_off/_MTN/inodeprints")) check(mtn("--rcfile=off.lua", "checkout", "--revision", rev, "co_off"), 0, false, false) check(not exists("co_off/_MTN/inodeprints")) -check(mtn("--rcfile=on.lua", "setup", "--branch=testbranch", "setup_on"), 0, false, false) +check(mtn_no_ws("--rcfile=on.lua", "setup", "--branch=testbranch", "setup_on"), 0, false, false) check(exists("setup_on/_MTN/inodeprints")) check(mtn("--rcfile=on.lua", "checkout", "--revision", rev, "co_on"), 0, false, false) check(exists("co_on/_MTN/inodeprints")) ============================================================ --- tests/workspace_migration/__driver__.lua 50f17508a5202fd16f9dd1db9c46b69413b101e9 +++ tests/workspace_migration/__driver__.lua de48548e28d94efe72581fcac617e0dee13764b1 @@ -7,7 +7,7 @@ -- run this test with the -d option, like so: -- $ ./testsuite.lua -d workspace_migration -- this will cause the test to leave behind its temporary files. --- Copy all the directories named +-- Copy all the directories named -- tester_dir/workspace_migration/-current/ -- to this directory, rename them -, and update -- the 'current_workspace_format' variable at the top of this file. @@ -16,7 +16,7 @@ -- workspace can represent, you may need to write a new workspace set, -- which goes in its own little lua file. Pick a , name the -- file .lua, and add to the workspace_sets array below. --- The file should return a table with three entries. +-- The file should return a table with three entries. -- -- 'creator' is a function of no arguments that creates a live -- workspace named '-current' which makes use of the new @@ -40,7 +40,7 @@ local current_workspace_format = 2 local current_workspace_format = 2 -local workspace_sets = { +local workspace_sets = { "basic", "inodeprints", "twoparent" @@ -48,9 +48,9 @@ function check_workspace_matches_current function check_workspace_matches_current(dir, refdir) check(samefile("nonsense-options", dir.."/_MTN/options")) - check(indir(refdir, mtn("automate", "get_current_revision")), 0, true, false) + check(indir(refdir, mtn_no_ws("automate", "get_current_revision")), 0, true, false) rename("stdout", "current-rev") - check(indir(dir, mtn("automate", "get_current_revision")), 0, true, false) + check(indir(dir, mtn_no_ws("automate", "get_current_revision")), 0, true, false) check(samefile("stdout", "current-rev")) -- and the log file check(samefile(dir .. "/_MTN/log", refdir .. "/_MTN/log")) @@ -66,7 +66,7 @@ function check_migrate_from(thing, versi function check_migrate_from(thing, version, checker) L(locheader(), - "checking migration of ", thing, "workspace from format version ", + "checking migration of ", thing, "workspace from format version ", version, "\n") local ws = thing .. "-" .. version get(ws, ws) ============================================================ --- tests/workspace_migration/basic.lua 04c86f17abd3d575bee28d3f3152b9f899ac4b35 +++ tests/workspace_migration/basic.lua eacceaf4c9c35b49cebc1e90edcc359393fc1b94 @@ -5,7 +5,7 @@ return { min_format = 1, creator = function () - check(mtn("setup", "-b", "basicbranch", "basic-current")) + check(mtn_no_ws("setup", "-b", "basicbranch", "basic-current")) chdir("basic-current") addfile("testfile1", "blah blah\n") addfile("testfile2", "asdfas dfsa\n") ============================================================ --- tests/workspace_migration/inodeprints.lua 57960c6f4766c6ed3cad53c6436f4922d7c75895 +++ tests/workspace_migration/inodeprints.lua 9c9376fe3aa32f08c5a7fa4cb2d84d570c11ba75 @@ -5,7 +5,7 @@ return { min_format = 1, creator = function () - check(mtn("setup", "-b", "inodeprints-branch", "inodeprints-current")) + check(mtn_no_ws("setup", "-b", "inodeprints-branch", "inodeprints-current")) chdir("inodeprints-current") writefile("_MTN/inodeprints") addfile("testfile1", "blah blah\n") ============================================================ --- tests/workspace_migration/twoparent.lua 581c3f3571a87e4d2ab8d43f204974f31ee6c425 +++ tests/workspace_migration/twoparent.lua ab7877e07e063754142a32599611dc58cd92a2a4 @@ -5,7 +5,7 @@ return { min_format = 2, creator = function () - check(mtn("setup", "-b", "twoparent-branch", "twoparent-current")) + check(mtn_no_ws("setup", "-b", "twoparent-branch", "twoparent-current")) chdir("twoparent-current") addfile("testfile", "ancestor\nancestor") addfile("attrfile", "this file has attributes")