Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlog.py @ 42567:4eaf7197a740
cleanup: use named constants for second arg to .seek()
Differential Revision: https://phab.mercurial-scm.org/D6556
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 20 Jun 2019 14:33:42 -0400 |
parents | bc4373babd04 |
children | 24111fb9a725 |
line wrap: on
line diff
--- a/mercurial/revlog.py Thu Jun 20 14:45:52 2019 -0700 +++ b/mercurial/revlog.py Thu Jun 20 14:33:42 2019 -0400 @@ -16,6 +16,7 @@ import collections import contextlib import errno +import io import os import struct import zlib @@ -2306,7 +2307,7 @@ try: with self._datafp() as f: - f.seek(0, 2) + f.seek(0, io.SEEK_END) actual = f.tell() dd = actual - expected except IOError as inst: @@ -2316,7 +2317,7 @@ try: f = self.opener(self.indexfile) - f.seek(0, 2) + f.seek(0, io.SEEK_END) actual = f.tell() f.close() s = self._io.size