##// END OF EJS Templates
amend: use cmdutil.check_at_most_one_arg()...
Martin von Zweigbergk -
r44346:774cee0e default
parent child Browse files
Show More
@@ -1056,13 +1056,12 b' def bailifchanged(repo, merge=True, hint'
1056
1056
1057 def logmessage(ui, opts):
1057 def logmessage(ui, opts):
1058 """ get the log message according to -m and -l option """
1058 """ get the log message according to -m and -l option """
1059
1060 check_at_most_one_arg(opts, b'message', b'logfile')
1061
1059 message = opts.get(b'message')
1062 message = opts.get(b'message')
1060 logfile = opts.get(b'logfile')
1063 logfile = opts.get(b'logfile')
1061
1064
1062 if message and logfile:
1063 raise error.Abort(
1064 _(b'options --message and --logfile are mutually exclusive')
1065 )
1066 if not message and logfile:
1065 if not message and logfile:
1067 try:
1066 try:
1068 if isstdiofilename(logfile):
1067 if isstdiofilename(logfile):
@@ -129,7 +129,7 b' Amend with editor'
129
129
130 $ echo FOO > $TESTTMP/msg
130 $ echo FOO > $TESTTMP/msg
131 $ hg amend -l $TESTTMP/msg -m BAR
131 $ hg amend -l $TESTTMP/msg -m BAR
132 abort: options --message and --logfile are mutually exclusive
132 abort: cannot specify both --message and --logfile
133 [255]
133 [255]
134 $ hg amend -l $TESTTMP/msg
134 $ hg amend -l $TESTTMP/msg
135 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/974f07f28537-edb6470a-amend.hg (obsstore-off !)
135 saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/974f07f28537-edb6470a-amend.hg (obsstore-off !)
General Comments 0
You need to be logged in to leave comments. Login now