diff --git a/mercurial/filelog.py b/mercurial/filelog.py --- a/mercurial/filelog.py +++ b/mercurial/filelog.py @@ -81,7 +81,7 @@ def iscensored(self, rev): return self._revlog.iscensored(rev) - # Used by verify. + # Used by repo upgrade, verify. def rawsize(self, rev): return self._revlog.rawsize(rev) diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py --- a/mercurial/upgrade.py +++ b/mercurial/upgrade.py @@ -491,10 +491,7 @@ for path in rl.files(): datasize += rl.opener.stat(path).st_size - idx = rl.index - for rev in rl: - e = idx[rev] - rawsize += e[2] + rawsize += sum(map(rl.rawsize, iter(rl))) srcsize += datasize srcrawsize += rawsize