##// END OF EJS Templates
errors: remove trailing "!" in messages about bad top-level args...
Martin von Zweigbergk -
r46521:ca39c450 default
parent child Browse files
Show More
@@ -1058,18 +1058,18 b' def _dispatch(req):'
1058 1058 req.canonical_command = cmd
1059 1059
1060 1060 if options[b"config"] != req.earlyoptions[b"config"]:
1061 raise error.Abort(_(b"option --config may not be abbreviated!"))
1061 raise error.Abort(_(b"option --config may not be abbreviated"))
1062 1062 if options[b"cwd"] != req.earlyoptions[b"cwd"]:
1063 raise error.Abort(_(b"option --cwd may not be abbreviated!"))
1063 raise error.Abort(_(b"option --cwd may not be abbreviated"))
1064 1064 if options[b"repository"] != req.earlyoptions[b"repository"]:
1065 1065 raise error.Abort(
1066 1066 _(
1067 1067 b"option -R has to be separated from other options (e.g. not "
1068 b"-qR) and --repository may only be abbreviated as --repo!"
1068 b"-qR) and --repository may only be abbreviated as --repo"
1069 1069 )
1070 1070 )
1071 1071 if options[b"debugger"] != req.earlyoptions[b"debugger"]:
1072 raise error.Abort(_(b"option --debugger may not be abbreviated!"))
1072 raise error.Abort(_(b"option --debugger may not be abbreviated"))
1073 1073 # don't validate --profile/--traceback, which can be enabled from now
1074 1074
1075 1075 if options[b"encoding"]:
@@ -62,20 +62,20 b' Parsing of early options should stop at '
62 62 Unparsable form of early options:
63 63
64 64 $ hg cat --debugg
65 abort: option --debugger may not be abbreviated!
65 abort: option --debugger may not be abbreviated
66 66 [255]
67 67
68 68 Parsing failure of early options should be detected before executing the
69 69 command:
70 70
71 71 $ hg log -b '--config=hooks.pre-log=false' default
72 abort: option --config may not be abbreviated!
72 abort: option --config may not be abbreviated
73 73 [255]
74 74 $ hg log -b -R. default
75 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
75 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
76 76 [255]
77 77 $ hg log --cwd .. -b --cwd=. default
78 abort: option --cwd may not be abbreviated!
78 abort: option --cwd may not be abbreviated
79 79 [255]
80 80
81 81 However, we can't prevent it from loading extensions and configs:
@@ -85,7 +85,7 b" However, we can't prevent it from loadin"
85 85 > EOF
86 86 $ hg log -b '--config=extensions.bad=bad.py' default
87 87 *** failed to import extension bad from bad.py: bad
88 abort: option --config may not be abbreviated!
88 abort: option --config may not be abbreviated
89 89 [255]
90 90
91 91 $ mkdir -p badrepo/.hg
@@ -113,7 +113,7 b' applied before the command name is resol'
113 113 [255]
114 114
115 115 $ hg log -b '--config=defaults.log=--config=hooks.pre-log=false'
116 abort: option --config may not be abbreviated!
116 abort: option --config may not be abbreviated
117 117 [255]
118 118
119 119 Shell aliases bypass any command parsing rules but for the early one:
@@ -143,13 +143,13 b' Early options must come first if HGPLAIN'
143 143 [255]
144 144
145 145 $ HGPLAIN=+strictflags hg log --config='hooks.pre-log=false' -b default
146 abort: option --config may not be abbreviated!
146 abort: option --config may not be abbreviated
147 147 [255]
148 148 $ HGPLAIN=+strictflags hg log -q --cwd=.. -b default
149 abort: option --cwd may not be abbreviated!
149 abort: option --cwd may not be abbreviated
150 150 [255]
151 151 $ HGPLAIN=+strictflags hg log -q -R . -b default
152 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
152 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
153 153 [255]
154 154
155 155 $ HGPLAIN=+strictflags hg --config='hooks.pre-log=false' log -b default
@@ -134,22 +134,22 b' earlygetopt short option without followi'
134 134 earlygetopt with illegal abbreviations:
135 135
136 136 $ hg --confi "foo.bar=baz"
137 abort: option --config may not be abbreviated!
137 abort: option --config may not be abbreviated
138 138 [255]
139 139 $ hg --cw a tip
140 abort: option --cwd may not be abbreviated!
140 abort: option --cwd may not be abbreviated
141 141 [255]
142 142 $ hg --rep a tip
143 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
143 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
144 144 [255]
145 145 $ hg --repositor a tip
146 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
146 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
147 147 [255]
148 148 $ hg -qR a tip
149 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
149 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
150 150 [255]
151 151 $ hg -qRa tip
152 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
152 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
153 153 [255]
154 154
155 155 Testing --cwd:
General Comments 0
You need to be logged in to leave comments. Login now