# # # add_dir "tests/warn_on_weird_branch_names" # # add_file "tests/warn_on_weird_branch_names/__driver__.lua" # content [28335819f62ef233f16b9eca53cc518addeefba0] # # patch "NEWS" # from [47e2effcf2d558cd202ee2c79e2b7437f35aed6b] # to [d10c8da088f4fee2dbbb13134c642e89300dd66d] # ============================================================ --- tests/warn_on_weird_branch_names/__driver__.lua 28335819f62ef233f16b9eca53cc518addeefba0 +++ tests/warn_on_weird_branch_names/__driver__.lua 28335819f62ef233f16b9eca53cc518addeefba0 @@ -0,0 +1,27 @@ + +mtn_setup() + +addfile("foo", "foofile") +commit() +R=base_revision() + +local branch_map = { + ["com.project"] = 0, + ["com.project.release-1.0"] = 0, + ["-com.project"] = 1, + ["com.project*"] = 1, + ["com.pr?ject"] = 1, + ["com.pr[o]j{e}ct"] = 1, + ["com.project-%20"] = 1, + ["com.project-1,0"] = 1, + ["^com.project!"] = 1 +} + +for branch,res in pairs(branch_map) do + check(mtn("cert", "--", R, "branch", branch), 0, false, true) + if res == 1 then + check(qgrep("contains meta characters", "stderr")) + else + check(not qgrep("contains meta characters", "stderr")) + end +end ============================================================ --- NEWS 47e2effcf2d558cd202ee2c79e2b7437f35aed6b +++ NEWS d10c8da088f4fee2dbbb13134c642e89300dd66d @@ -57,6 +57,15 @@ Xxx Xxx 99 99:99:99 UTC 2010 commands such as `clone`, `automate remote` and `automate remote_stdio`. + - The following characters have been deprecated in branch names: + + ?,*%+{}[]!^ + + as they denote either meta characters in monotone's URI syntax + or in globs which are used to resolve branch patterns. + monotone now warns on the creation of branches with those + characters and gives further directions. + - The `import` command now keeps the created bookkeeping root if --dry-run is not specified. This makes it possible to re-use the import directory as workspace and is also more closely