comparison mercurial/localrepo.py @ 21274:3b4c75690206

journal: set Abort hint when failing due to an abandoned transaction
author Johan Bjork <jbjoerk@gmail.com>
date Thu, 08 May 2014 14:58:25 +0000
parents 0054a77f49df
children a45af4da0421
comparison
equal deleted inserted replaced
21273:20b8090d8125 21274:3b4c75690206
855 return tr.nest() 855 return tr.nest()
856 856
857 # abort here if the journal already exists 857 # abort here if the journal already exists
858 if self.svfs.exists("journal"): 858 if self.svfs.exists("journal"):
859 raise error.RepoError( 859 raise error.RepoError(
860 _("abandoned transaction found - run hg recover")) 860 _("abandoned transaction found"),
861 hint=_("run 'hg recover' to clean up transaction"))
861 862
862 def onclose(): 863 def onclose():
863 self.store.write(tr) 864 self.store.write(tr)
864 865
865 self._writejournal(desc) 866 self._writejournal(desc)