hgext/githelp.py
changeset 42395 eddff539f5be
parent 41415 873a28d7e962
child 42396 37ff80505dfd
equal deleted inserted replaced
42394:ad55a0a5894f 42395:eddff539f5be
   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):