Show More
@@ -192,12 +192,15 b' def am(ui, repo, *args, **kwargs):' | |||||
192 | def apply(ui, repo, *args, **kwargs): |
|
192 | def apply(ui, repo, *args, **kwargs): | |
193 | cmdoptions = [ |
|
193 | cmdoptions = [ | |
194 | ('p', 'p', int, ''), |
|
194 | ('p', 'p', int, ''), | |
|
195 | ('', 'directory', '', ''), | |||
195 | ] |
|
196 | ] | |
196 | args, opts = parseoptions(ui, cmdoptions, args) |
|
197 | args, opts = parseoptions(ui, cmdoptions, args) | |
197 |
|
198 | |||
198 | cmd = Command('import --no-commit') |
|
199 | cmd = Command('import --no-commit') | |
199 | if (opts.get('p')): |
|
200 | if (opts.get('p')): | |
200 | cmd['-p'] = opts.get('p') |
|
201 | cmd['-p'] = opts.get('p') | |
|
202 | if opts.get('directory'): | |||
|
203 | cmd['--prefix'] = opts.get('directory') | |||
201 | cmd.extend(args) |
|
204 | cmd.extend(args) | |
202 |
|
205 | |||
203 | ui.status((bytes(cmd)), "\n") |
|
206 | ui.status((bytes(cmd)), "\n") |
@@ -256,6 +256,10 b' githelp for apply with directory strip c' | |||||
256 | $ hg githelp -- apply -p 5 |
|
256 | $ hg githelp -- apply -p 5 | |
257 | hg import --no-commit -p 5 |
|
257 | hg import --no-commit -p 5 | |
258 |
|
258 | |||
|
259 | githelp for apply with prefix directory | |||
|
260 | $ hg githelp -- apply --directory=modules | |||
|
261 | hg import --no-commit --prefix modules | |||
|
262 | ||||
259 | git merge-base |
|
263 | git merge-base | |
260 | $ hg githelp -- git merge-base --is-ancestor |
|
264 | $ hg githelp -- git merge-base --is-ancestor | |
261 | ignoring unknown option --is-ancestor |
|
265 | ignoring unknown option --is-ancestor |
General Comments 0
You need to be logged in to leave comments.
Login now