# # # add_file "tests/t_setup_workspace_in_workspace.at" # content [f6a97e0b20a324b9ef2e65fe1ba39f09d2fefe4d] # # patch "ChangeLog" # from [d9fab5d3f58a65731f716612ed5fe327635c80f9] # to [05d486b0fb6e45753270e34da16b79719f671794] # # patch "commands.cc" # from [157253b2dde200336505b4ae8a95059e4dbfab3e] # to [52541d8a7684f14ec39abdec419e70f68e326293] # # patch "testsuite.at" # from [8c08bfb49ec4d72e285e391aba1f8eab218839fd] # to [1d542b89c1cc4e708d6dfa8c593e3ce0b9c1f92f] # ============================================================ --- tests/t_setup_workspace_in_workspace.at f6a97e0b20a324b9ef2e65fe1ba39f09d2fefe4d +++ tests/t_setup_workspace_in_workspace.at f6a97e0b20a324b9ef2e65fe1ba39f09d2fefe4d @@ -0,0 +1,11 @@ +AT_SETUP([setup in subdirectory]) +MTN_SETUP + +# Set up a project +AT_CHECK(MTN setup --branch=testbranch foo, [], [ignore], [ignore]) + +# Then set up another project in a subdirectory without giving a database +# or branch. mtn SHOULD fail on this. +AT_CHECK(cd foo && SAFE_MTN setup bar, [1], [ignore], [ignore]) + +AT_CLEANUP ============================================================ --- ChangeLog d9fab5d3f58a65731f716612ed5fe327635c80f9 +++ ChangeLog 05d486b0fb6e45753270e34da16b79719f671794 @@ -1,3 +1,13 @@ +2006-04-14 Richard Levitte + + * commands.cc (CMD(setup)): Make this a CMD_NO_WORKSPACE. The + reason is a use-case, when someone setup a new project as a + subdirectory of another project, and forgot to give the database + and branch for this new project, and thereby ended up having it + be in the same database and branch as the parent directory. + * tests/t_setup_workspace_in_workspace.at (setup in subdirectory), + testsuit.at: Add a test for it. + 2006-04-12 Nathaniel Smith * unix/process.cc (read_umask): New function. ============================================================ --- commands.cc 157253b2dde200336505b4ae8a95059e4dbfab3e +++ commands.cc 52541d8a7684f14ec39abdec419e70f68e326293 @@ -3892,7 +3892,7 @@ } } -CMD(setup, N_("tree"), N_("[DIRECTORY]"), N_("setup a new workspace directory, default to current"), +CMD_NO_WORKSPACE(setup, N_("tree"), N_("[DIRECTORY]"), N_("setup a new workspace directory, default to current"), OPT_BRANCH_NAME) { if (args.size() > 1) ============================================================ --- testsuite.at 8c08bfb49ec4d72e285e391aba1f8eab218839fd +++ testsuite.at 1d542b89c1cc4e708d6dfa8c593e3ce0b9c1f92f @@ -873,5 +873,5 @@ m4_include(tests/t_rosterify_empty_manifest.at) m4_include(tests/t_netsync_no_include.at) m4_include(tests/t_pidfile_log_permissions.at) - m4_include(tests/t_executable_umask.at) +m4_include(tests/t_setup_workspace_in_workspace.at)