Comments
Patch
@@ -256,6 +256,10 @@
$ hg githelp -- apply -p 5
hg import --no-commit -p 5
+githelp for apply with prefix directory
+ $ hg githelp -- apply --directory=modules
+ hg import --no-commit --prefix modules
+
git merge-base
$ hg githelp -- git merge-base --is-ancestor
ignoring unknown option --is-ancestor
@@ -192,12 +192,15 @@
def apply(ui, repo, *args, **kwargs):
cmdoptions = [
('p', 'p', int, ''),
+ ('', 'directory', '', ''),
]
args, opts = parseoptions(ui, cmdoptions, args)
cmd = Command('import --no-commit')
if (opts.get('p')):
cmd['-p'] = opts.get('p')
+ if opts.get('directory'):
+ cmd['--prefix'] = opts.get('directory')
cmd.extend(args)
ui.status((bytes(cmd)), "\n")