dispatch: write Abort hint to stderr too
authorPatrick Mezard <pmezard@gmail.com>
Mon, 26 Jul 2010 22:28:37 +0200
changeset 11683 757f39fa1162
parent 11682 f54ec9c70877
child 11684 39bac1821b12
dispatch: write Abort hint to stderr too
mercurial/dispatch.py
tests/test-subrepo.out
--- 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