Show More
@@ -32,7 +32,7 b' def toposort(ui, rl):' | |||||
32 | ui.status('reading revs\n') |
|
32 | ui.status('reading revs\n') | |
33 | try: |
|
33 | try: | |
34 | for i in rl: |
|
34 | for i in rl: | |
35 | ui.progress('reading', i, total=len(rl)) |
|
35 | ui.progress(_('reading'), i, total=len(rl)) | |
36 | children[i] = [] |
|
36 | children[i] = [] | |
37 | parents = [p for p in rl.parentrevs(i) if p != node.nullrev] |
|
37 | parents = [p for p in rl.parentrevs(i) if p != node.nullrev] | |
38 | # in case of duplicate parents |
|
38 | # in case of duplicate parents | |
@@ -45,7 +45,7 b' def toposort(ui, rl):' | |||||
45 | if len(parents) == 0: |
|
45 | if len(parents) == 0: | |
46 | root.append(i) |
|
46 | root.append(i) | |
47 | finally: |
|
47 | finally: | |
48 | ui.progress('reading', None, total=len(rl)) |
|
48 | ui.progress(_('reading'), None, total=len(rl)) | |
49 |
|
49 | |||
50 | # XXX this is a reimplementation of the 'branchsort' topo sort |
|
50 | # XXX this is a reimplementation of the 'branchsort' topo sort | |
51 | # algorithm in hgext.convert.convcmd... would be nice not to duplicate |
|
51 | # algorithm in hgext.convert.convcmd... would be nice not to duplicate | |
@@ -75,7 +75,7 b' def writerevs(ui, r1, r2, order, tr):' | |||||
75 |
|
75 | |||
76 | count = [0] |
|
76 | count = [0] | |
77 | def progress(*args): |
|
77 | def progress(*args): | |
78 | ui.progress('writing', count[0], total=len(order)) |
|
78 | ui.progress(_('writing'), count[0], total=len(order)) | |
79 | count[0] += 1 |
|
79 | count[0] += 1 | |
80 |
|
80 | |||
81 | order = [r1.node(r) for r in order] |
|
81 | order = [r1.node(r) for r in order] | |
@@ -89,7 +89,7 b' def writerevs(ui, r1, r2, order, tr):' | |||||
89 | chunkiter = changegroup.chunkiter(group) |
|
89 | chunkiter = changegroup.chunkiter(group) | |
90 | r2.addgroup(chunkiter, unlookup, tr) |
|
90 | r2.addgroup(chunkiter, unlookup, tr) | |
91 | finally: |
|
91 | finally: | |
92 | ui.progress('writing', None, len(order)) |
|
92 | ui.progress(_('writing'), None, len(order)) | |
93 |
|
93 | |||
94 | def report(ui, olddatafn, newdatafn): |
|
94 | def report(ui, olddatafn, newdatafn): | |
95 | oldsize = float(os.stat(olddatafn).st_size) |
|
95 | oldsize = float(os.stat(olddatafn).st_size) |
@@ -1339,7 +1339,7 b' class localrepository(repo.repository):' | |||||
1339 |
|
1339 | |||
1340 | if r: |
|
1340 | if r: | |
1341 | reqcnt += 1 |
|
1341 | reqcnt += 1 | |
1342 | self.ui.progress('searching', reqcnt, unit='queries') |
|
1342 | self.ui.progress(_('searching'), reqcnt, unit='queries') | |
1343 | self.ui.debug("request %d: %s\n" % |
|
1343 | self.ui.debug("request %d: %s\n" % | |
1344 | (reqcnt, " ".join(map(short, r)))) |
|
1344 | (reqcnt, " ".join(map(short, r)))) | |
1345 | for p in xrange(0, len(r), 10): |
|
1345 | for p in xrange(0, len(r), 10): | |
@@ -1352,7 +1352,7 b' class localrepository(repo.repository):' | |||||
1352 | while search: |
|
1352 | while search: | |
1353 | newsearch = [] |
|
1353 | newsearch = [] | |
1354 | reqcnt += 1 |
|
1354 | reqcnt += 1 | |
1355 | self.ui.progress('searching', reqcnt, unit='queries') |
|
1355 | self.ui.progress(_('searching'), reqcnt, unit='queries') | |
1356 | for n, l in zip(search, remote.between(search)): |
|
1356 | for n, l in zip(search, remote.between(search)): | |
1357 | l.append(n[1]) |
|
1357 | l.append(n[1]) | |
1358 | p = n[0] |
|
1358 | p = n[0] | |
@@ -1388,7 +1388,7 b' class localrepository(repo.repository):' | |||||
1388 | self.ui.debug("found new changesets starting at " + |
|
1388 | self.ui.debug("found new changesets starting at " + | |
1389 | " ".join([short(f) for f in fetch]) + "\n") |
|
1389 | " ".join([short(f) for f in fetch]) + "\n") | |
1390 |
|
1390 | |||
1391 | self.ui.progress('searching', None, unit='queries') |
|
1391 | self.ui.progress(_('searching'), None, unit='queries') | |
1392 | self.ui.debug("%d total queries\n" % reqcnt) |
|
1392 | self.ui.debug("%d total queries\n" % reqcnt) | |
1393 |
|
1393 | |||
1394 | return base.keys(), list(fetch), heads |
|
1394 | return base.keys(), list(fetch), heads | |
@@ -1819,9 +1819,9 b' class localrepository(repo.repository):' | |||||
1819 | cnt = 0 |
|
1819 | cnt = 0 | |
1820 | for chnk in group: |
|
1820 | for chnk in group: | |
1821 | yield chnk |
|
1821 | yield chnk | |
1822 | self.ui.progress('bundle changes', cnt, unit='chunks') |
|
1822 | self.ui.progress(_('bundle changes'), cnt, unit='chunks') | |
1823 | cnt += 1 |
|
1823 | cnt += 1 | |
1824 | self.ui.progress('bundle changes', None, unit='chunks') |
|
1824 | self.ui.progress(_('bundle changes'), None, unit='chunks') | |
1825 |
|
1825 | |||
1826 |
|
1826 | |||
1827 | # Figure out which manifest nodes (of the ones we think might be |
|
1827 | # Figure out which manifest nodes (of the ones we think might be | |
@@ -1847,9 +1847,9 b' class localrepository(repo.repository):' | |||||
1847 | cnt = 0 |
|
1847 | cnt = 0 | |
1848 | for chnk in group: |
|
1848 | for chnk in group: | |
1849 | yield chnk |
|
1849 | yield chnk | |
1850 | self.ui.progress('bundle manifests', cnt, unit='chunks') |
|
1850 | self.ui.progress(_('bundle manifests'), cnt, unit='chunks') | |
1851 | cnt += 1 |
|
1851 | cnt += 1 | |
1852 | self.ui.progress('bundle manifests', None, unit='chunks') |
|
1852 | self.ui.progress(_('bundle manifests'), None, unit='chunks') | |
1853 |
|
1853 | |||
1854 | # These are no longer needed, dereference and toss the memory for |
|
1854 | # These are no longer needed, dereference and toss the memory for | |
1855 | # them. |
|
1855 | # them. | |
@@ -1898,7 +1898,7 b' class localrepository(repo.repository):' | |||||
1898 | del msng_filenode_set[fname] |
|
1898 | del msng_filenode_set[fname] | |
1899 | # Signal that no more groups are left. |
|
1899 | # Signal that no more groups are left. | |
1900 | yield changegroup.closechunk() |
|
1900 | yield changegroup.closechunk() | |
1901 | self.ui.progress('bundle files', None, unit='chunks') |
|
1901 | self.ui.progress(_('bundle files'), None, unit='chunks') | |
1902 |
|
1902 | |||
1903 | if msng_cl_lst: |
|
1903 | if msng_cl_lst: | |
1904 | self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) |
|
1904 | self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) | |
@@ -1947,19 +1947,19 b' class localrepository(repo.repository):' | |||||
1947 |
|
1947 | |||
1948 | cnt = 0 |
|
1948 | cnt = 0 | |
1949 | for chnk in cl.group(nodes, identity, collect): |
|
1949 | for chnk in cl.group(nodes, identity, collect): | |
1950 | self.ui.progress('bundle changes', cnt, unit='chunks') |
|
1950 | self.ui.progress(_('bundle changes'), cnt, unit='chunks') | |
1951 | cnt += 1 |
|
1951 | cnt += 1 | |
1952 | yield chnk |
|
1952 | yield chnk | |
1953 | self.ui.progress('bundle changes', None, unit='chunks') |
|
1953 | self.ui.progress(_('bundle changes'), None, unit='chunks') | |
1954 |
|
1954 | |||
1955 | mnfst = self.manifest |
|
1955 | mnfst = self.manifest | |
1956 | nodeiter = gennodelst(mnfst) |
|
1956 | nodeiter = gennodelst(mnfst) | |
1957 | cnt = 0 |
|
1957 | cnt = 0 | |
1958 | for chnk in mnfst.group(nodeiter, lookuprevlink_func(mnfst)): |
|
1958 | for chnk in mnfst.group(nodeiter, lookuprevlink_func(mnfst)): | |
1959 | self.ui.progress('bundle manifests', cnt, unit='chunks') |
|
1959 | self.ui.progress(_('bundle manifests'), cnt, unit='chunks') | |
1960 | cnt += 1 |
|
1960 | cnt += 1 | |
1961 | yield chnk |
|
1961 | yield chnk | |
1962 | self.ui.progress('bundle manifests', None, unit='chunks') |
|
1962 | self.ui.progress(_('bundle manifests'), None, unit='chunks') | |
1963 |
|
1963 | |||
1964 | cnt = 0 |
|
1964 | cnt = 0 | |
1965 | for fname in sorted(changedfiles): |
|
1965 | for fname in sorted(changedfiles): | |
@@ -2022,7 +2022,7 b' class localrepository(repo.repository):' | |||||
2022 | self.ui.status(_("adding changesets\n")) |
|
2022 | self.ui.status(_("adding changesets\n")) | |
2023 | clstart = len(cl) |
|
2023 | clstart = len(cl) | |
2024 | class prog(object): |
|
2024 | class prog(object): | |
2025 | step = 'changesets' |
|
2025 | step = _('changesets') | |
2026 | count = 1 |
|
2026 | count = 1 | |
2027 | ui = self.ui |
|
2027 | ui = self.ui | |
2028 | def __call__(self): |
|
2028 | def __call__(self): | |
@@ -2034,11 +2034,11 b' class localrepository(repo.repository):' | |||||
2034 | raise util.Abort(_("received changelog group is empty")) |
|
2034 | raise util.Abort(_("received changelog group is empty")) | |
2035 | clend = len(cl) |
|
2035 | clend = len(cl) | |
2036 | changesets = clend - clstart |
|
2036 | changesets = clend - clstart | |
2037 | self.ui.progress('changesets', None) |
|
2037 | self.ui.progress(_('changesets'), None) | |
2038 |
|
2038 | |||
2039 | # pull off the manifest group |
|
2039 | # pull off the manifest group | |
2040 | self.ui.status(_("adding manifests\n")) |
|
2040 | self.ui.status(_("adding manifests\n")) | |
2041 | pr.step = 'manifests' |
|
2041 | pr.step = _('manifests') | |
2042 | pr.count = 1 |
|
2042 | pr.count = 1 | |
2043 | chunkiter = changegroup.chunkiter(source, progress=pr) |
|
2043 | chunkiter = changegroup.chunkiter(source, progress=pr) | |
2044 | # no need to check for empty manifest group here: |
|
2044 | # no need to check for empty manifest group here: | |
@@ -2046,7 +2046,7 b' class localrepository(repo.repository):' | |||||
2046 | # no new manifest will be created and the manifest group will |
|
2046 | # no new manifest will be created and the manifest group will | |
2047 | # be empty during the pull |
|
2047 | # be empty during the pull | |
2048 | self.manifest.addgroup(chunkiter, revmap, trp) |
|
2048 | self.manifest.addgroup(chunkiter, revmap, trp) | |
2049 | self.ui.progress('manifests', None) |
|
2049 | self.ui.progress(_('manifests'), None) | |
2050 |
|
2050 | |||
2051 | needfiles = {} |
|
2051 | needfiles = {} | |
2052 | if self.ui.configbool('server', 'validate', default=False): |
|
2052 | if self.ui.configbool('server', 'validate', default=False): | |
@@ -2082,7 +2082,7 b' class localrepository(repo.repository):' | |||||
2082 | needs.remove(n) |
|
2082 | needs.remove(n) | |
2083 | if not needs: |
|
2083 | if not needs: | |
2084 | del needfiles[f] |
|
2084 | del needfiles[f] | |
2085 | self.ui.progress('files', None) |
|
2085 | self.ui.progress(_('files'), None) | |
2086 |
|
2086 | |||
2087 | for f, needs in needfiles.iteritems(): |
|
2087 | for f, needs in needfiles.iteritems(): | |
2088 | fl = self.file(f) |
|
2088 | fl = self.file(f) |
@@ -122,7 +122,7 b' def _verify(repo):' | |||||
122 | checklog(cl, "changelog", 0) |
|
122 | checklog(cl, "changelog", 0) | |
123 | total = len(repo) |
|
123 | total = len(repo) | |
124 | for i in repo: |
|
124 | for i in repo: | |
125 | ui.progress('changelog', i, total=total) |
|
125 | ui.progress(_('changelog'), i, total=total) | |
126 | n = cl.node(i) |
|
126 | n = cl.node(i) | |
127 | checkentry(cl, i, n, seen, [i], "changelog") |
|
127 | checkentry(cl, i, n, seen, [i], "changelog") | |
128 |
|
128 | |||
@@ -133,14 +133,14 b' def _verify(repo):' | |||||
133 | filelinkrevs.setdefault(f, []).append(i) |
|
133 | filelinkrevs.setdefault(f, []).append(i) | |
134 | except Exception, inst: |
|
134 | except Exception, inst: | |
135 | exc(i, _("unpacking changeset %s") % short(n), inst) |
|
135 | exc(i, _("unpacking changeset %s") % short(n), inst) | |
136 | ui.progress('changelog', None) |
|
136 | ui.progress(_('changelog'), None) | |
137 |
|
137 | |||
138 | ui.status(_("checking manifests\n")) |
|
138 | ui.status(_("checking manifests\n")) | |
139 | seen = {} |
|
139 | seen = {} | |
140 | checklog(mf, "manifest", 0) |
|
140 | checklog(mf, "manifest", 0) | |
141 | total = len(mf) |
|
141 | total = len(mf) | |
142 | for i in mf: |
|
142 | for i in mf: | |
143 | ui.progress('manifests', i, total=total) |
|
143 | ui.progress(_('manifests'), i, total=total) | |
144 | n = mf.node(i) |
|
144 | n = mf.node(i) | |
145 | lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest") |
|
145 | lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest") | |
146 | if n in mflinkrevs: |
|
146 | if n in mflinkrevs: | |
@@ -156,7 +156,7 b' def _verify(repo):' | |||||
156 | filenodes.setdefault(f, {}).setdefault(fn, lr) |
|
156 | filenodes.setdefault(f, {}).setdefault(fn, lr) | |
157 | except Exception, inst: |
|
157 | except Exception, inst: | |
158 | exc(lr, _("reading manifest delta %s") % short(n), inst) |
|
158 | exc(lr, _("reading manifest delta %s") % short(n), inst) | |
159 | ui.progress('manifests', None) |
|
159 | ui.progress(_('manifests'), None) | |
160 |
|
160 | |||
161 | ui.status(_("crosschecking files in changesets and manifests\n")) |
|
161 | ui.status(_("crosschecking files in changesets and manifests\n")) | |
162 |
|
162 | |||
@@ -166,13 +166,13 b' def _verify(repo):' | |||||
166 | for c, m in sorted([(c, m) for m in mflinkrevs |
|
166 | for c, m in sorted([(c, m) for m in mflinkrevs | |
167 | for c in mflinkrevs[m]]): |
|
167 | for c in mflinkrevs[m]]): | |
168 | count += 1 |
|
168 | count += 1 | |
169 | ui.progress('crosscheck', count, total=total) |
|
169 | ui.progress(_('crosscheck'), count, total=total) | |
170 | err(c, _("changeset refers to unknown manifest %s") % short(m)) |
|
170 | err(c, _("changeset refers to unknown manifest %s") % short(m)) | |
171 | mflinkrevs = None # del is bad here due to scope issues |
|
171 | mflinkrevs = None # del is bad here due to scope issues | |
172 |
|
172 | |||
173 | for f in sorted(filelinkrevs): |
|
173 | for f in sorted(filelinkrevs): | |
174 | count += 1 |
|
174 | count += 1 | |
175 | ui.progress('crosscheck', count, total=total) |
|
175 | ui.progress(_('crosscheck'), count, total=total) | |
176 | if f not in filenodes: |
|
176 | if f not in filenodes: | |
177 | lr = filelinkrevs[f][0] |
|
177 | lr = filelinkrevs[f][0] | |
178 | err(lr, _("in changeset but not in manifest"), f) |
|
178 | err(lr, _("in changeset but not in manifest"), f) | |
@@ -180,7 +180,7 b' def _verify(repo):' | |||||
180 | if havecl: |
|
180 | if havecl: | |
181 | for f in sorted(filenodes): |
|
181 | for f in sorted(filenodes): | |
182 | count += 1 |
|
182 | count += 1 | |
183 | ui.progress('crosscheck', count, total=total) |
|
183 | ui.progress(_('crosscheck'), count, total=total) | |
184 | if f not in filelinkrevs: |
|
184 | if f not in filelinkrevs: | |
185 | try: |
|
185 | try: | |
186 | fl = repo.file(f) |
|
186 | fl = repo.file(f) | |
@@ -189,7 +189,7 b' def _verify(repo):' | |||||
189 | lr = None |
|
189 | lr = None | |
190 | err(lr, _("in manifest but not in changeset"), f) |
|
190 | err(lr, _("in manifest but not in changeset"), f) | |
191 |
|
191 | |||
192 | ui.progress('crosscheck', None) |
|
192 | ui.progress(_('crosscheck'), None) | |
193 |
|
193 | |||
194 | ui.status(_("checking files\n")) |
|
194 | ui.status(_("checking files\n")) | |
195 |
|
195 | |||
@@ -203,7 +203,7 b' def _verify(repo):' | |||||
203 | files = sorted(set(filenodes) | set(filelinkrevs)) |
|
203 | files = sorted(set(filenodes) | set(filelinkrevs)) | |
204 | total = len(files) |
|
204 | total = len(files) | |
205 | for i, f in enumerate(files): |
|
205 | for i, f in enumerate(files): | |
206 | ui.progress('files', i, item=f, total=total) |
|
206 | ui.progress(_('files'), i, item=f, total=total) | |
207 | try: |
|
207 | try: | |
208 | linkrevs = filelinkrevs[f] |
|
208 | linkrevs = filelinkrevs[f] | |
209 | except KeyError: |
|
209 | except KeyError: | |
@@ -281,7 +281,7 b' def _verify(repo):' | |||||
281 | fns = [(lr, n) for n, lr in filenodes[f].iteritems()] |
|
281 | fns = [(lr, n) for n, lr in filenodes[f].iteritems()] | |
282 | for lr, node in sorted(fns): |
|
282 | for lr, node in sorted(fns): | |
283 | err(lr, _("%s in manifests not found") % short(node), f) |
|
283 | err(lr, _("%s in manifests not found") % short(node), f) | |
284 | ui.progress('files', None) |
|
284 | ui.progress(_('files'), None) | |
285 |
|
285 | |||
286 | for f in storefiles: |
|
286 | for f in storefiles: | |
287 | warn(_("warning: orphan revlog '%s'") % f) |
|
287 | warn(_("warning: orphan revlog '%s'") % f) |
General Comments 0
You need to be logged in to leave comments.
Login now