comparison mercurial/verify.py @ 9690:b33d70849a20

verify: report existence of journal
author Sune Foldager <cryo@cyanite.org>
date Mon, 02 Nov 2009 10:15:04 +0100
parents 96c803e9018f
children 25e572394f5c
comparison
equal deleted inserted replaced
9689:57cee011ffcb 9690:b33d70849a20
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2, incorporated herein by reference. 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 from node import nullid, short 8 from node import nullid, short
9 from i18n import _ 9 from i18n import _
10 import os
10 import revlog, util, error 11 import revlog, util, error
11 12
12 def verify(repo): 13 def verify(repo):
13 lock = repo.lock() 14 lock = repo.lock()
14 try: 15 try:
102 103
103 if node in seen: 104 if node in seen:
104 err(lr, _("duplicate revision %d (%d)") % (i, seen[n]), f) 105 err(lr, _("duplicate revision %d (%d)") % (i, seen[n]), f)
105 seen[n] = i 106 seen[n] = i
106 return lr 107 return lr
108
109 if os.path.exists(repo.sjoin("journal")):
110 ui.warn(_("abandoned transaction found - run hg recover\n"))
107 111
108 revlogv1 = cl.version != revlog.REVLOGV0 112 revlogv1 = cl.version != revlog.REVLOGV0
109 if ui.verbose or not revlogv1: 113 if ui.verbose or not revlogv1:
110 ui.status(_("repository uses revlog format %d\n") % 114 ui.status(_("repository uses revlog format %d\n") %
111 (revlogv1 and 1 or 0)) 115 (revlogv1 and 1 or 0))