##// 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 req.canonical_command = cmd
1058 req.canonical_command = cmd
1059
1059
1060 if options[b"config"] != req.earlyoptions[b"config"]:
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 if options[b"cwd"] != req.earlyoptions[b"cwd"]:
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 if options[b"repository"] != req.earlyoptions[b"repository"]:
1064 if options[b"repository"] != req.earlyoptions[b"repository"]:
1065 raise error.Abort(
1065 raise error.Abort(
1066 _(
1066 _(
1067 b"option -R has to be separated from other options (e.g. not "
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 if options[b"debugger"] != req.earlyoptions[b"debugger"]:
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 # don't validate --profile/--traceback, which can be enabled from now
1073 # don't validate --profile/--traceback, which can be enabled from now
1074
1074
1075 if options[b"encoding"]:
1075 if options[b"encoding"]:
@@ -62,20 +62,20 b' Parsing of early options should stop at '
62 Unparsable form of early options:
62 Unparsable form of early options:
63
63
64 $ hg cat --debugg
64 $ hg cat --debugg
65 abort: option --debugger may not be abbreviated!
65 abort: option --debugger may not be abbreviated
66 [255]
66 [255]
67
67
68 Parsing failure of early options should be detected before executing the
68 Parsing failure of early options should be detected before executing the
69 command:
69 command:
70
70
71 $ hg log -b '--config=hooks.pre-log=false' default
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 [255]
73 [255]
74 $ hg log -b -R. default
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 [255]
76 [255]
77 $ hg log --cwd .. -b --cwd=. default
77 $ hg log --cwd .. -b --cwd=. default
78 abort: option --cwd may not be abbreviated!
78 abort: option --cwd may not be abbreviated
79 [255]
79 [255]
80
80
81 However, we can't prevent it from loading extensions and configs:
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 > EOF
85 > EOF
86 $ hg log -b '--config=extensions.bad=bad.py' default
86 $ hg log -b '--config=extensions.bad=bad.py' default
87 *** failed to import extension bad from bad.py: bad
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 [255]
89 [255]
90
90
91 $ mkdir -p badrepo/.hg
91 $ mkdir -p badrepo/.hg
@@ -113,7 +113,7 b' applied before the command name is resol'
113 [255]
113 [255]
114
114
115 $ hg log -b '--config=defaults.log=--config=hooks.pre-log=false'
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 [255]
117 [255]
118
118
119 Shell aliases bypass any command parsing rules but for the early one:
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 [255]
143 [255]
144
144
145 $ HGPLAIN=+strictflags hg log --config='hooks.pre-log=false' -b default
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 [255]
147 [255]
148 $ HGPLAIN=+strictflags hg log -q --cwd=.. -b default
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 [255]
150 [255]
151 $ HGPLAIN=+strictflags hg log -q -R . -b default
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 [255]
153 [255]
154
154
155 $ HGPLAIN=+strictflags hg --config='hooks.pre-log=false' log -b default
155 $ HGPLAIN=+strictflags hg --config='hooks.pre-log=false' log -b default
@@ -134,22 +134,22 b' earlygetopt short option without followi'
134 earlygetopt with illegal abbreviations:
134 earlygetopt with illegal abbreviations:
135
135
136 $ hg --confi "foo.bar=baz"
136 $ hg --confi "foo.bar=baz"
137 abort: option --config may not be abbreviated!
137 abort: option --config may not be abbreviated
138 [255]
138 [255]
139 $ hg --cw a tip
139 $ hg --cw a tip
140 abort: option --cwd may not be abbreviated!
140 abort: option --cwd may not be abbreviated
141 [255]
141 [255]
142 $ hg --rep a tip
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 [255]
144 [255]
145 $ hg --repositor a tip
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 [255]
147 [255]
148 $ hg -qR a tip
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 [255]
150 [255]
151 $ hg -qRa tip
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 [255]
153 [255]
154
154
155 Testing --cwd:
155 Testing --cwd:
General Comments 0
You need to be logged in to leave comments. Login now