comparison hgext/mq.py @ 5334:448eb46d4d84

mq: fix qrefresh -e with no patches applied
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 24 Sep 2007 19:00:11 -0300
parents 438ff951df70
children 24de027551c1
comparison
equal deleted inserted replaced
5333:6e6a00a7bf75 5334:448eb46d4d84
1605 git-style patches (--git or [diff] git=1) to track copies and renames. 1605 git-style patches (--git or [diff] git=1) to track copies and renames.
1606 """ 1606 """
1607 q = repo.mq 1607 q = repo.mq
1608 message = cmdutil.logmessage(opts) 1608 message = cmdutil.logmessage(opts)
1609 if opts['edit']: 1609 if opts['edit']:
1610 if not q.applied:
1611 ui.write(_("No patches applied\n"))
1612 return 1
1610 if message: 1613 if message:
1611 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) 1614 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"'))
1612 patch = q.applied[-1].name 1615 patch = q.applied[-1].name
1613 (message, comment, user, date, hasdiff) = q.readheaders(patch) 1616 (message, comment, user, date, hasdiff) = q.readheaders(patch)
1614 message = ui.edit('\n'.join(message), user or ui.username()) 1617 message = ui.edit('\n'.join(message), user or ui.username())