Mercurial > public > mercurial-scm > hg
diff hgext/shelve.py @ 21852:37a5decc6924
shelve: accept '--edit' like other commands creating new changeset
After this patch, users can invoke editor for the commit message by
'--edit' option regardless of '--message'.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 20 Jun 2014 16:15:38 +0900 |
parents | aad28ff87788 |
children | dabf8fb8a91e d43d116a118c |
line wrap: on
line diff
--- a/hgext/shelve.py Fri Jun 20 16:15:38 2014 +0900 +++ b/hgext/shelve.py Fri Jun 20 16:15:38 2014 +0900 @@ -178,7 +178,8 @@ if hasmq: saved, repo.mq.checkapplied = repo.mq.checkapplied, False try: - return repo.commit(message, user, opts.get('date'), match) + return repo.commit(message, user, opts.get('date'), match, + editor=cmdutil.getcommiteditor(**opts)) finally: if hasmq: repo.mq.checkapplied = saved @@ -635,6 +636,8 @@ _('shelve with the specified commit date'), _('DATE')), ('d', 'delete', None, _('delete the named shelved change(s)')), + ('e', 'edit', False, + _('invoke editor on commit messages')), ('l', 'list', None, _('list current shelves')), ('m', 'message', '', @@ -680,6 +683,7 @@ ('cleanup', 'cleanup'), # ('date', 'create'), # ignored for passing '--date "0 0"' in tests ('delete', 'delete'), + ('edit', 'create'), ('list', 'list'), ('message', 'create'), ('name', 'create'),