##// END OF EJS Templates
commands.import: accept a prefix option...
Siddharth Agarwal -
r24258:093e8a5e default
parent child Browse files
Show More
@@ -4057,6 +4057,8 b' def identify(ui, repo, source=None, rev='
4057 4057 _('commit even if some hunks fail')),
4058 4058 ('', 'exact', None,
4059 4059 _('apply patch to the nodes from which it was generated')),
4060 ('', 'prefix', '',
4061 _('apply patch to directory relative to the root'), _('DIR')),
4060 4062 ('', 'import-branch', None,
4061 4063 _('use any branch information in patch (implied by --exact)'))] +
4062 4064 commitopts + commitopts2 + similarityopts,
@@ -4156,6 +4158,8 b' def import_(ui, repo, patch1=None, *patc'
4156 4158 raise util.Abort(_('cannot use --similarity with --bypass'))
4157 4159 if opts.get('exact') and opts.get('edit'):
4158 4160 raise util.Abort(_('cannot use --exact with --edit'))
4161 if opts.get('exact') and opts.get('prefix'):
4162 raise util.Abort(_('cannot use --exact with --prefix'))
4159 4163
4160 4164 if update:
4161 4165 cmdutil.checkunfinished(repo)
@@ -268,7 +268,7 b' Show all commands + options'
268 268 heads: rev, topo, active, closed, style, template
269 269 help: extension, command, keyword
270 270 identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure
271 import: strip, base, edit, force, no-commit, bypass, partial, exact, import-branch, message, logfile, date, user, similarity
271 import: strip, base, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity
272 272 incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos
273 273 locate: rev, print0, fullpath, include, exclude
274 274 manifest: rev, all, template
@@ -112,6 +112,9 b' Test unsupported combinations'
112 112 $ hg import --bypass --similarity 50 ../test.diff
113 113 abort: cannot use --similarity with --bypass
114 114 [255]
115 $ hg import --exact --prefix dir/ ../test.diff
116 abort: cannot use --exact with --prefix
117 [255]
115 118
116 119 Test commit editor
117 120 (this also tests that editor is invoked, if the patch doesn't contain
General Comments 0
You need to be logged in to leave comments. Login now