diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -1398,7 +1398,7 @@ def tryimportone(ui, repo, hunk, parents else: # launch the editor message = None - ui.debug('message:\n%s\n' % message) + ui.debug('message:\n%s\n' % (message or '')) if len(parents) == 1: parents.append(repo[nullid])