Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 41174:08dd462ea782
graft: abort if --date/user specified with --currentdate/currentuser (BC)
They are conflicting options. Let's explicitly ban such combination.
Note that this means you need "--no-currentdate --date" to override
--currentdate specified in aliases/defaults.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 10 Jan 2019 21:57:21 +0900 |
parents | 074c72a38423 |
children | 183df3df6031 |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Jan 10 21:32:37 2019 +0900 +++ b/mercurial/commands.py Thu Jan 10 21:57:21 2019 +0900 @@ -2393,6 +2393,10 @@ # list of new nodes created by ongoing graft statedata['newnodes'] = [] + if opts.get('user') and opts.get('currentuser'): + raise error.Abort(_('--user and --currentuser are mutually exclusive')) + if opts.get('date') and opts.get('currentdate'): + raise error.Abort(_('--date and --currentdate are mutually exclusive')) if not opts.get('user') and opts.get('currentuser'): opts['user'] = ui.username() if not opts.get('date') and opts.get('currentdate'):