diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -2489,9 +2489,6 @@ def refresh(ui, repo, *pats, **opts): """ q = repo.mq message = cmdutil.logmessage(ui, opts) - if opts.get('edit'): - if message: - raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) setupheaderopts(ui, opts) wlock = repo.wlock() try: diff --git a/tests/test-mq-qrefresh-replace-log-message.t b/tests/test-mq-qrefresh-replace-log-message.t --- a/tests/test-mq-qrefresh-replace-log-message.t +++ b/tests/test-mq-qrefresh-replace-log-message.t @@ -26,9 +26,19 @@ Should display 'First commit message' First commit message Testing changing message with -m +(this tests also that '--edit' can be used with '--message') $ echo bbbb > file - $ hg qrefresh -m "Second commit message" + $ HGEDITOR=cat hg qrefresh -m "Second commit message" -e + Second commit message + + + HG: Enter commit message. Lines beginning with 'HG:' are removed. + HG: Leave message empty to use default message. + HG: -- + HG: user: test + HG: branch 'default' + HG: added file Should display 'Second commit message'