##// END OF EJS Templates
commit: use cmdutil.check_at_most_one_arg()...
Martin von Zweigbergk -
r44345:2e672ccc default
parent child Browse files
Show More
@@ -278,10 +278,8 b' def resolvecommitoptions(ui, opts):'
278 The return value indicates that ``rewrite.update-timestamp`` is the reason
278 The return value indicates that ``rewrite.update-timestamp`` is the reason
279 the ``date`` option is set.
279 the ``date`` option is set.
280 """
280 """
281 if opts.get(b'date') and opts.get(b'currentdate'):
281 check_at_most_one_arg(opts, b'date', b'currentdate')
282 raise error.Abort(_(b'--date and --currentdate are mutually exclusive'))
282 check_at_most_one_arg(opts, b'user', b'currentuser')
283 if opts.get(b'user') and opts.get(b'currentuser'):
284 raise error.Abort(_(b'--user and --currentuser are mutually exclusive'))
285
283
286 datemaydiffer = False # date-only change should be ignored?
284 datemaydiffer = False # date-only change should be ignored?
287
285
@@ -447,7 +447,7 b' rewrite.update-timestamp can be negated '
447 Bad combination of date options:
447 Bad combination of date options:
448
448
449 $ hg amend -D --date '0 0'
449 $ hg amend -D --date '0 0'
450 abort: --date and --currentdate are mutually exclusive
450 abort: cannot specify both --date and --currentdate
451 [255]
451 [255]
452
452
453 Close branch
453 Close branch
@@ -127,10 +127,10 b' Conflicting date/user options:'
127
127
128 $ hg up -q 0
128 $ hg up -q 0
129 $ hg graft -U --user foo 2
129 $ hg graft -U --user foo 2
130 abort: --user and --currentuser are mutually exclusive
130 abort: cannot specify both --user and --currentuser
131 [255]
131 [255]
132 $ hg graft -D --date '0 0' 2
132 $ hg graft -D --date '0 0' 2
133 abort: --date and --currentdate are mutually exclusive
133 abort: cannot specify both --date and --currentdate
134 [255]
134 [255]
135
135
136 Can't graft with dirty wd:
136 Can't graft with dirty wd:
@@ -554,10 +554,10 b' Bad option combinations'
554
554
555 $ hg rollback -q --config ui.rollback=True
555 $ hg rollback -q --config ui.rollback=True
556 $ hg uncommit -U --user 'user'
556 $ hg uncommit -U --user 'user'
557 abort: --user and --currentuser are mutually exclusive
557 abort: cannot specify both --user and --currentuser
558 [255]
558 [255]
559 $ hg uncommit -D --date today
559 $ hg uncommit -D --date today
560 abort: --date and --currentdate are mutually exclusive
560 abort: cannot specify both --date and --currentdate
561 [255]
561 [255]
562
562
563 `uncommit <dir>` and `cd <dir> && uncommit .` behave the same...
563 `uncommit <dir>` and `cd <dir> && uncommit .` behave the same...
General Comments 0
You need to be logged in to leave comments. Login now