hgext/mq.py
changeset 4134 9dc64c8414ca
parent 4100 c30c922f907a
parent 4133 a9ee6c53af8d
child 4177 ba51a8225a60
equal deleted inserted replaced
4126:b9dcee25be8e 4134:9dc64c8414ca
  1736     if patch is None and args[0][0:1] not in '-+':
  1736     if patch is None and args[0][0:1] not in '-+':
  1737         patch = args.pop(0)
  1737         patch = args.pop(0)
  1738     if patch is None:
  1738     if patch is None:
  1739         raise util.Abort(_('no patch to work with'))
  1739         raise util.Abort(_('no patch to work with'))
  1740     if args or opts['none']:
  1740     if args or opts['none']:
  1741         q.set_guards(q.find_series(patch), args)
  1741         idx = q.find_series(patch)
       
  1742         if idx is None:
       
  1743             raise util.Abort(_('no patch named %s') % patch)
       
  1744         q.set_guards(idx, args)
  1742         q.save_dirty()
  1745         q.save_dirty()
  1743     else:
  1746     else:
  1744         status(q.series.index(q.lookup(patch)))
  1747         status(q.series.index(q.lookup(patch)))
  1745 
  1748 
  1746 def header(ui, repo, patch=None):
  1749 def header(ui, repo, patch=None):