diff -r 31e9f66863f3 -r 093e8a5e995f mercurial/commands.py --- a/mercurial/commands.py Tue Mar 10 11:01:10 2015 -0700 +++ b/mercurial/commands.py Fri Mar 06 22:56:19 2015 -0800 @@ -4057,6 +4057,8 @@ _('commit even if some hunks fail')), ('', 'exact', None, _('apply patch to the nodes from which it was generated')), + ('', 'prefix', '', + _('apply patch to directory relative to the root'), _('DIR')), ('', 'import-branch', None, _('use any branch information in patch (implied by --exact)'))] + commitopts + commitopts2 + similarityopts, @@ -4156,6 +4158,8 @@ raise util.Abort(_('cannot use --similarity with --bypass')) if opts.get('exact') and opts.get('edit'): raise util.Abort(_('cannot use --exact with --edit')) + if opts.get('exact') and opts.get('prefix'): + raise util.Abort(_('cannot use --exact with --prefix')) if update: cmdutil.checkunfinished(repo)