# HG changeset patch # User Gregory Szorc # Date 1442087220 25200 # Node ID eb97d49768ccec62e3ebaafefba0e45824c596b7 # Parent 2b1434e5eaa05752f8773f354a1a2db6a0f5f427 revlog: rename generic "i" variable to "indexdata" Increase readability. diff -r 2b1434e5eaa0 -r eb97d49768cc mercurial/revlog.py --- 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