118 |
118 |
119 havecl = len(cl) > 0 |
119 havecl = len(cl) > 0 |
120 havemf = len(mf) > 0 |
120 havemf = len(mf) > 0 |
121 |
121 |
122 ui.status(_("checking changesets\n")) |
122 ui.status(_("checking changesets\n")) |
|
123 hasmanifest = False |
123 seen = {} |
124 seen = {} |
124 checklog(cl, "changelog", 0) |
125 checklog(cl, "changelog", 0) |
125 total = len(repo) |
126 total = len(repo) |
126 for i in repo: |
127 for i in repo: |
127 ui.progress(_('checking'), i, total=total, unit=_('changesets')) |
128 ui.progress(_('checking'), i, total=total, unit=_('changesets')) |
128 n = cl.node(i) |
129 n = cl.node(i) |
129 checkentry(cl, i, n, seen, [i], "changelog") |
130 checkentry(cl, i, n, seen, [i], "changelog") |
130 |
131 |
131 try: |
132 try: |
132 changes = cl.read(n) |
133 changes = cl.read(n) |
133 mflinkrevs.setdefault(changes[0], []).append(i) |
134 if changes[0] != nullid: |
|
135 mflinkrevs.setdefault(changes[0], []).append(i) |
|
136 hasmanifest = True |
134 for f in changes[3]: |
137 for f in changes[3]: |
135 filelinkrevs.setdefault(f, []).append(i) |
138 filelinkrevs.setdefault(f, []).append(i) |
136 except Exception, inst: |
139 except Exception, inst: |
|
140 hasmanifest = True |
137 exc(i, _("unpacking changeset %s") % short(n), inst) |
141 exc(i, _("unpacking changeset %s") % short(n), inst) |
138 ui.progress(_('checking'), None) |
142 ui.progress(_('checking'), None) |
139 |
143 |
140 ui.status(_("checking manifests\n")) |
144 ui.status(_("checking manifests\n")) |
141 seen = {} |
145 seen = {} |
142 checklog(mf, "manifest", 0) |
146 if hasmanifest: |
|
147 # Do not check manifest if there are only changelog entries with |
|
148 # null manifests. |
|
149 checklog(mf, "manifest", 0) |
143 total = len(mf) |
150 total = len(mf) |
144 for i in mf: |
151 for i in mf: |
145 ui.progress(_('checking'), i, total=total, unit=_('manifests')) |
152 ui.progress(_('checking'), i, total=total, unit=_('manifests')) |
146 n = mf.node(i) |
153 n = mf.node(i) |
147 lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest") |
154 lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest") |