changeset 11683:757f39fa1162

dispatch: write Abort hint to stderr too
author Patrick Mezard <pmezard@gmail.com>
date Mon, 26 Jul 2010 22:28:37 +0200
parents f54ec9c70877
children 39bac1821b12
files mercurial/dispatch.py tests/test-subrepo.out
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Mon Jul 26 22:26:12 2010 +0200
+++ b/mercurial/dispatch.py	Mon Jul 26 22:28:37 2010 +0200
@@ -24,7 +24,7 @@
     except util.Abort, inst:
         sys.stderr.write(_("abort: %s\n") % inst)
         if inst.hint:
-            sys.stdout.write(_("(%s)\n") % inst.hint)
+            sys.stderr.write(_("(%s)\n") % inst.hint)
         return -1
     except error.ParseError, inst:
         if len(inst.args) > 1:
@@ -119,7 +119,7 @@
     except util.Abort, inst:
         ui.warn(_("abort: %s\n") % inst)
         if inst.hint:
-            ui.status(_("(%s)\n") % inst.hint)
+            ui.warn(_("(%s)\n") % inst.hint)
     except ImportError, inst:
         ui.warn(_("abort: %s!\n") % inst)
         m = str(inst).split()[-1]
--- a/tests/test-subrepo.out	Mon Jul 26 22:26:12 2010 +0200
+++ b/tests/test-subrepo.out	Mon Jul 26 22:28:37 2010 +0200
@@ -183,13 +183,13 @@
 % push -f
 committing subrepository s
 abort: push creates new remote heads on branch 'default'!
+(did you forget to merge? use push -f to force)
 pushing ...sub/t
 pushing ...sub/t/s/ss
 searching for changes
 no changes found
 pushing ...sub/t/s
 searching for changes
-(did you forget to merge? use push -f to force)
 pushing ...sub/t
 pushing ...sub/t/s/ss
 searching for changes
@@ -300,4 +300,5 @@
 created new head
 committing subrepository s
 abort: push creates new remote heads on branch 'default'!
+(did you forget to merge? use push -f to force)
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved