Mercurial > public > mercurial-scm > hg
comparison mercurial/verify.py @ 17720:9a1796af4f8d
verify: rename "hasmanifest" variable for source code readability
Before this patch, there are two ambiguous variables: "havemf" and
"hasmanifest".
"havemf" means whether there are any "manifest" entries.
"hasmanifest" means whether there are any "changelog" entries
referring to "manifest" entry.
This patch renames from "hasmanifest" to "refersmf" to clear
difference from "havemf".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 04 Oct 2012 01:24:05 +0900 |
parents | 2e3ceb59c312 |
children | 7aa7380691b8 |
comparison
equal
deleted
inserted
replaced
17719:2e3ceb59c312 | 17720:9a1796af4f8d |
---|---|
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 refersmf = False |
124 seen = {} | 124 seen = {} |
125 checklog(cl, "changelog", 0) | 125 checklog(cl, "changelog", 0) |
126 total = len(repo) | 126 total = len(repo) |
127 for i in repo: | 127 for i in repo: |
128 ui.progress(_('checking'), i, total=total, unit=_('changesets')) | 128 ui.progress(_('checking'), i, total=total, unit=_('changesets')) |
131 | 131 |
132 try: | 132 try: |
133 changes = cl.read(n) | 133 changes = cl.read(n) |
134 if changes[0] != nullid: | 134 if changes[0] != nullid: |
135 mflinkrevs.setdefault(changes[0], []).append(i) | 135 mflinkrevs.setdefault(changes[0], []).append(i) |
136 hasmanifest = True | 136 refersmf = True |
137 for f in changes[3]: | 137 for f in changes[3]: |
138 filelinkrevs.setdefault(f, []).append(i) | 138 filelinkrevs.setdefault(f, []).append(i) |
139 except Exception, inst: | 139 except Exception, inst: |
140 hasmanifest = True | 140 refersmf = True |
141 exc(i, _("unpacking changeset %s") % short(n), inst) | 141 exc(i, _("unpacking changeset %s") % short(n), inst) |
142 ui.progress(_('checking'), None) | 142 ui.progress(_('checking'), None) |
143 | 143 |
144 ui.status(_("checking manifests\n")) | 144 ui.status(_("checking manifests\n")) |
145 seen = {} | 145 seen = {} |
146 if hasmanifest: | 146 if refersmf: |
147 # Do not check manifest if there are only changelog entries with | 147 # Do not check manifest if there are only changelog entries with |
148 # null manifests. | 148 # null manifests. |
149 checklog(mf, "manifest", 0) | 149 checklog(mf, "manifest", 0) |
150 total = len(mf) | 150 total = len(mf) |
151 for i in mf: | 151 for i in mf: |