190 ui.status(bytes(cmd), "\n") |
190 ui.status(bytes(cmd), "\n") |
191 |
191 |
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") |
204 |
207 |
205 def bisect(ui, repo, *args, **kwargs): |
208 def bisect(ui, repo, *args, **kwargs): |