2018-10-15 17:24:54 +03:00
|
|
|
Test various flags to turn off bad hg features.
|
|
|
|
|
|
|
|
$ newrepo
|
|
|
|
$ drawdag <<'EOS'
|
|
|
|
> A
|
|
|
|
> EOS
|
|
|
|
$ hg up -Cq $A
|
|
|
|
|
2018-10-16 19:23:18 +03:00
|
|
|
Test disabling the `hg merge` command:
|
2018-10-15 17:24:54 +03:00
|
|
|
$ hg merge
|
|
|
|
abort: nothing to merge
|
|
|
|
[255]
|
|
|
|
$ setconfig ui.allowmerge=False
|
|
|
|
$ hg merge
|
|
|
|
abort: merging is not supported for this repository
|
|
|
|
(use rebase instead)
|
|
|
|
[255]
|
2018-10-15 18:02:29 +03:00
|
|
|
|
|
|
|
Test disabling the `hg tag` command:
|
|
|
|
$ hg tag foo
|
|
|
|
$ hg tags
|
|
|
|
tip 1:9b0f5d3c138d
|
|
|
|
foo 0:426bada5c675
|
|
|
|
$ setconfig ui.allowtags=False
|
|
|
|
$ hg tag foo2
|
|
|
|
abort: new tags are disabled in this repository
|
|
|
|
[255]
|
|
|
|
$ hg tags
|
|
|
|
abort: tags are disabled in this repository
|
|
|
|
[255]
|
2018-10-16 19:23:18 +03:00
|
|
|
|
|
|
|
Test disabling the `hg branch` commands:
|
|
|
|
$ hg branch
|
|
|
|
default
|
|
|
|
$ setconfig ui.allowbranches=False
|
|
|
|
$ hg branch foo
|
|
|
|
abort: named branches are disabled in this repository
|
|
|
|
(use bookmarks instead)
|
|
|
|
[255]
|
|
|
|
$ setconfig ui.disallowedbrancheshint="use bookmarks instead! see docs"
|
|
|
|
$ hg branch -C
|
|
|
|
abort: named branches are disabled in this repository
|
|
|
|
(use bookmarks instead! see docs)
|
|
|
|
[255]
|
|
|
|
$ hg branches
|
|
|
|
abort: named branches are disabled in this repository
|
|
|
|
(use bookmarks instead! see docs)
|
|
|
|
[255]
|
2018-10-19 05:51:53 +03:00
|
|
|
$ hg branch
|
|
|
|
default
|