mercurial/cmdutil.py
changeset 25795 69145daacdfa
parent 25763 60c791592aa7
child 25930 221491bbaf7e
--- a/mercurial/cmdutil.py	Sun Jul 12 01:51:01 2015 +0800
+++ b/mercurial/cmdutil.py	Wed Jul 15 03:43:16 2015 +0900
@@ -81,8 +81,11 @@
     import merge as mergemod
 
     if not ui.interactive():
-        raise util.Abort(_('running non-interactively, use %s instead') %
-                         cmdsuggest)
+        if cmdsuggest:
+            msg = _('running non-interactively, use %s instead') % cmdsuggest
+        else:
+            msg = _('running non-interactively')
+        raise util.Abort(msg)
 
     # make sure username is set before going interactive
     if not opts.get('user'):