# # # patch "ChangeLog" # from [45ec71acd0f5f5e0c92acbfc7a21807ef0d47192] # to [a1fe7d2580e6bc12e18506157e2ba69c1705e894] # # patch "commands.cc" # from [e7de372c6f8b0f6214f18eb7682017731a7961e0] # to [33b8690ab922b91ac0218b9412ba6a84d024094d] # # patch "monotone.texi" # from [be8338ba2bd81bf7d939bfe0228d093f28cb7943] # to [f01bc564b6e7cc613dcf86ef89f99e5196bf60f7] # # patch "tests/t_setup_existing_path.at" # from [0f84f1e69ba45ca565d23fdf122d91154af1d286] # to [ce17bd423597f38adb7065e230cc73e226aebfeb] # ============================================================ --- ChangeLog 45ec71acd0f5f5e0c92acbfc7a21807ef0d47192 +++ ChangeLog a1fe7d2580e6bc12e18506157e2ba69c1705e894 @@ -1,3 +1,9 @@ +2006-01-20 Matt Johnston + + * commands.cc CMD(setup): default to current dir + * monotone.texi: update + * t_setup_existing_path.at: add test + 2006-01-19 Emile Snyder Add a --brief mode to the annotate command which prints more ============================================================ --- commands.cc e7de372c6f8b0f6214f18eb7682017731a7961e0 +++ commands.cc 33b8690ab922b91ac0218b9412ba6a84d024094d @@ -3668,16 +3668,21 @@ } } -CMD(setup, N_("tree"), N_("DIRECTORY"), N_("setup a new working copy directory"), +CMD(setup, N_("tree"), N_("[DIRECTORY]"), N_("setup a new working copy directory, default to current"), OPT_BRANCH_NAME) { - if (args.size() != 1) + if (args.size() > 1) throw usage(name); N(!app.branch_name().empty(), F("need --branch argument for setup")); app.db.ensure_open(); - string dir = idx(args,0)(); + string dir; + if (args.size() == 1) + dir = idx(args,0)(); + else + dir = "."; + app.create_working_copy(dir); revision_id null; put_revision_id(null); ============================================================ --- monotone.texi be8338ba2bd81bf7d939bfe0228d093f28cb7943 +++ monotone.texi f01bc564b6e7cc613dcf86ef89f99e5196bf60f7 @@ -3793,7 +3793,7 @@ @section Working Copy @ftable @command address@hidden monotone setup @var{directory} address@hidden monotone setup address@hidden This command prepares @var{directory} as a monotone working directory, by creating and populating the @file{MT} directory with basic information. This information must include at least the branch and the @@ -3802,7 +3802,8 @@ This can be used with an empty directory to start a new blank project, or within an existing directory full of files, prior to using address@hidden commit}. address@hidden commit}. If no directory is specified, the current +directory is used. @item monotone add @var{pathname...} ============================================================ --- tests/t_setup_existing_path.at 0f84f1e69ba45ca565d23fdf122d91154af1d286 +++ tests/t_setup_existing_path.at ce17bd423597f38adb7065e230cc73e226aebfeb @@ -7,5 +7,7 @@ AT_CHECK(mkdir bar) AT_CHECK(MONOTONE setup --branch=testbranch bar, [], [ignore], [ignore]) AT_CHECK(test -d bar/MT) +AT_CHECK(rm -r bar/MT) +AT_CHECK(cd bar && MONOTONE setup --branch=testbranch, [], [ignore], [ignore]) AT_CLEANUP