From patchwork Thu May 8 20:05:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: journal: Set Abort hint when failing due to an abandoned transaction From: =?utf-8?q?Johan_Bj=C3=B6rk?= X-Patchwork-Id: 4675 Message-Id: To: mercurial-devel@selenic.com Date: Thu, 8 May 2014 16:05:15 -0400 # HG changeset patch # User Johan Bjork # Date 1399561105 0 # Thu May 08 14:58:25 2014 +0000 # Node ID cf7bd4622f4af4121575f10e19e73a16c56a6b34 # Parent 62a2749895e4151f766a4243fa870b1ddd7386d0 journal: Set Abort hint when failing due to an abandoned transaction diff -r 62a2749895e4 -r cf7bd4622f4a mercurial/localrepo.py --- a/mercurial/localrepo.py Wed May 07 17:58:13 2014 -0500 +++ b/mercurial/localrepo.py Thu May 08 14:58:25 2014 +0000 @@ -857,7 +857,7 @@ # 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")) def onclose(): self.store.write(tr) diff -r 62a2749895e4 -r cf7bd4622f4a tests/test-journal-exists.t --- a/tests/test-journal-exists.t Wed May 07 17:58:13 2014 -0500 +++ b/tests/test-journal-exists.t Thu May 08 14:58:25 2014 +0000 @@ -9,7 +9,8 @@ $ echo foo > a $ hg ci -Am0 - abort: abandoned transaction found - run hg recover! + abort: abandoned transaction found! + (run hg recover) [255] $ hg recover