# HG changeset patch
# User Johan Bjork <jbjoerk@gmail.com>
# Date 2014-05-08 14:58:25
# Node ID 3b4c75690206e9ad90864354dbfc36196c97934c
# Parent  20b8090d812531501c5205ff04d1f937f6ac912c

journal: set Abort hint when failing due to an abandoned transaction

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -857,7 +857,8 @@ class localrepository(object):
         # abort here if the journal already exists
         if self.svfs.exists("journal"):
             raise error.RepoError(
-                _("abandoned transaction found - run hg recover"))
+                _("abandoned transaction found"),
+                hint=_("run 'hg recover' to clean up transaction"))
 
         def onclose():
             self.store.write(tr)
diff --git a/tests/test-journal-exists.t b/tests/test-journal-exists.t
--- a/tests/test-journal-exists.t
+++ b/tests/test-journal-exists.t
@@ -9,7 +9,8 @@
 
   $ echo foo > a
   $ hg ci -Am0
-  abort: abandoned transaction found - run hg recover!
+  abort: abandoned transaction found!
+  (run 'hg recover' to clean up transaction)
   [255]
 
   $ hg recover