Show More
@@ -260,6 +260,18 b' debugrevlogopts = [' | |||
|
260 | 260 | _linebelow = b"^HG: ------------------------ >8 ------------------------$" |
|
261 | 261 | |
|
262 | 262 | |
|
263 | def check_at_most_one_arg(opts, *args): | |
|
264 | """abort if more than one of the arguments are in opts""" | |
|
265 | previous = None | |
|
266 | for x in args: | |
|
267 | if opts.get(x): | |
|
268 | if previous: | |
|
269 | raise error.Abort( | |
|
270 | _(b'cannot specify both --%s and --%s') % (previous, x) | |
|
271 | ) | |
|
272 | previous = x | |
|
273 | ||
|
274 | ||
|
263 | 275 | def resolvecommitoptions(ui, opts): |
|
264 | 276 | """modify commit options dict to handle related options |
|
265 | 277 |
@@ -1889,8 +1889,7 b' def clone(ui, source, dest=None, **opts)' | |||
|
1889 | 1889 | Returns 0 on success. |
|
1890 | 1890 | """ |
|
1891 | 1891 | opts = pycompat.byteskwargs(opts) |
|
1892 | if opts.get(b'noupdate') and opts.get(b'updaterev'): | |
|
1893 | raise error.Abort(_(b"cannot specify both --noupdate and --updaterev")) | |
|
1892 | cmdutil.check_at_most_one_arg(opts, b'noupdate', b'updaterev') | |
|
1894 | 1893 | |
|
1895 | 1894 | # --include/--exclude can come from narrow or sparse. |
|
1896 | 1895 | includepats, excludepats = None, None |
General Comments 0
You need to be logged in to leave comments.
Login now