Mercurial > hgsubversion
comparison hgsubversion/verify.py @ 898:6524260be543
show a total for verification progress
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Sun, 13 May 2012 15:36:45 +0200 |
parents | 6bc8046e3d0a |
children | 7f90bb48c9de |
comparison
equal
deleted
inserted
replaced
897:6bc8046e3d0a | 898:6524260be543 |
---|---|
36 ui.write('verifying %s against %s@%i\n' % (ctx, branchurl, srev)) | 36 ui.write('verifying %s against %s@%i\n' % (ctx, branchurl, srev)) |
37 | 37 |
38 svnfiles = set() | 38 svnfiles = set() |
39 result = 0 | 39 result = 0 |
40 | 40 |
41 hgfiles = set(ctx) - util.ignoredfiles | |
42 | |
41 svndata = svn.list_files(branchpath, srev) | 43 svndata = svn.list_files(branchpath, srev) |
42 for i, (fn, type) in enumerate(svndata): | 44 for i, (fn, type) in enumerate(svndata): |
43 util.progress(ui, 'verify', i) | 45 util.progress(ui, 'verify', i, total=len(hgfiles)) |
46 | |
44 if type != 'f': | 47 if type != 'f': |
45 continue | 48 continue |
46 svnfiles.add(fn) | 49 svnfiles.add(fn) |
47 fp = fn | 50 fp = fn |
48 if branchpath: | 51 if branchpath: |
58 result = 1 | 61 result = 1 |
59 if not fctx.flags() == mode: | 62 if not fctx.flags() == mode: |
60 ui.write('wrong flags for: %s\n' % fn) | 63 ui.write('wrong flags for: %s\n' % fn) |
61 result = 1 | 64 result = 1 |
62 | 65 |
63 hgfiles = set(ctx) - util.ignoredfiles | |
64 if hgfiles != svnfiles: | 66 if hgfiles != svnfiles: |
65 unexpected = hgfiles - svnfiles | 67 unexpected = hgfiles - svnfiles |
66 for f in sorted(unexpected): | 68 for f in sorted(unexpected): |
67 ui.write('unexpected file: %s\n' % f) | 69 ui.write('unexpected file: %s\n' % f) |
68 missing = svnfiles - hgfiles | 70 missing = svnfiles - hgfiles |
69 for f in sorted(missing): | 71 for f in sorted(missing): |
70 ui.write('missing file: %s\n' % f) | 72 ui.write('missing file: %s\n' % f) |
71 result = 1 | 73 result = 1 |
72 | 74 |
73 util.progress(ui, 'verify', None) | 75 util.progress(ui, 'verify', None, total=len(hgfiles)) |
74 | 76 |
75 return result | 77 return result |