diff --git a/hgext/shelve.py b/hgext/shelve.py --- a/hgext/shelve.py +++ b/hgext/shelve.py @@ -279,7 +279,7 @@ def createcmd(ui, repo, pats, opts): if not interactive: node = cmdutil.commit(ui, repo, commitfunc, pats, opts) else: - node = cmdutil.dorecord(ui, repo, interactivecommitfunc, 'commit', + node = cmdutil.dorecord(ui, repo, interactivecommitfunc, None, False, cmdutil.recordfilter, *pats, **opts) if not node: stat = repo.status(match=scmutil.match(repo[None], pats, opts)) diff --git a/tests/test-shelve.t b/tests/test-shelve.t --- a/tests/test-shelve.t +++ b/tests/test-shelve.t @@ -860,6 +860,9 @@ Test interactive shelve $ cat foo/foo foo a + $ hg shelve --interactive --config ui.interactive=false + abort: running non-interactively + [255] $ hg shelve --interactive << EOF > y > y