Mercurial > hg
changeset 26241:eb97d49768cc
revlog: rename generic "i" variable to "indexdata"
Increase readability.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 12 Sep 2015 12:47:00 -0700 |
parents | 2b1434e5eaa0 |
children | d708873f1f33 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Sat Sep 12 11:31:56 2015 -0700 +++ b/mercurial/revlog.py Sat Sep 12 12:47:00 2015 -0700 @@ -238,14 +238,14 @@ raise RevlogError(_('revlog chunk cache size %r is not a power ' 'of 2') % self._chunkcachesize) - i = '' + indexdata = '' self._initempty = True try: f = self.opener(self.indexfile) - i = f.read() + indexdata = f.read() f.close() - if len(i) > 0: - v = struct.unpack(versionformat, i[:4])[0] + if len(indexdata) > 0: + v = struct.unpack(versionformat, indexdata[:4])[0] self._initempty = False except IOError as inst: if inst.errno != errno.ENOENT: @@ -270,7 +270,7 @@ if self.version == REVLOGV0: self._io = revlogoldio() try: - d = self._io.parseindex(i, self._inline) + d = self._io.parseindex(indexdata, self._inline) except (ValueError, IndexError): raise RevlogError(_("index %s is corrupted") % (self.indexfile)) self.index, nodemap, self._chunkcache = d