equal
deleted
inserted
replaced
17 |
17 |
18 from . import ( |
18 from . import ( |
19 error, |
19 error, |
20 pycompat, |
20 pycompat, |
21 revlog, |
21 revlog, |
22 scmutil, |
|
23 util, |
22 util, |
24 ) |
23 ) |
25 |
24 |
26 def verify(repo): |
25 def verify(repo): |
27 with repo.lock(): |
26 with repo.lock(): |
33 while '//' in f: |
32 while '//' in f: |
34 f = f.replace('//', '/') |
33 f = f.replace('//', '/') |
35 return f |
34 return f |
36 |
35 |
37 class verifier(object): |
36 class verifier(object): |
38 # The match argument is always None in hg core, but e.g. the narrowhg |
37 def __init__(self, repo): |
39 # extension will pass in a matcher here. |
|
40 def __init__(self, repo, match=None): |
|
41 self.repo = repo.unfiltered() |
38 self.repo = repo.unfiltered() |
42 self.ui = repo.ui |
39 self.ui = repo.ui |
43 self.match = match or scmutil.matchall(repo) |
40 self.match = repo.narrowmatch() |
44 self.badrevs = set() |
41 self.badrevs = set() |
45 self.errors = 0 |
42 self.errors = 0 |
46 self.warnings = 0 |
43 self.warnings = 0 |
47 self.havecl = len(repo.changelog) > 0 |
44 self.havecl = len(repo.changelog) > 0 |
48 self.havemf = len(repo.manifestlog.getstorage(b'')) > 0 |
45 self.havemf = len(repo.manifestlog.getstorage(b'')) > 0 |