Mercurial > hg
comparison hgext/mq.py @ 4133:a9ee6c53af8d
mq: abort cleanly when invalid patch name is given to qguard
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Sat, 03 Mar 2007 17:54:13 +0100 |
parents | 785ad8cd1d31 |
children | 9dc64c8414ca 1df1baf2002e |
comparison
equal
deleted
inserted
replaced
4132:0d94e4a3ddb4 | 4133:a9ee6c53af8d |
---|---|
1710 if patch is None and args[0][0:1] not in '-+': | 1710 if patch is None and args[0][0:1] not in '-+': |
1711 patch = args.pop(0) | 1711 patch = args.pop(0) |
1712 if patch is None: | 1712 if patch is None: |
1713 raise util.Abort(_('no patch to work with')) | 1713 raise util.Abort(_('no patch to work with')) |
1714 if args or opts['none']: | 1714 if args or opts['none']: |
1715 q.set_guards(q.find_series(patch), args) | 1715 idx = q.find_series(patch) |
1716 if idx is None: | |
1717 raise util.Abort(_('no patch named %s') % patch) | |
1718 q.set_guards(idx, args) | |
1716 q.save_dirty() | 1719 q.save_dirty() |
1717 else: | 1720 else: |
1718 status(q.series.index(q.lookup(patch))) | 1721 status(q.series.index(q.lookup(patch))) |
1719 | 1722 |
1720 def header(ui, repo, patch=None): | 1723 def header(ui, repo, patch=None): |