Mercurial > public > mercurial-scm > hg-stable
diff hgext/fastannotate/revmap.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 | 1205ba8f11ac |
children | 2372284d9457 |
line wrap: on
line diff
--- a/hgext/fastannotate/revmap.py Thu Jun 20 14:45:52 2019 -0700 +++ b/hgext/fastannotate/revmap.py Thu Jun 20 14:33:42 2019 -0400 @@ -8,6 +8,7 @@ from __future__ import absolute_import import bisect +import io import os import struct @@ -246,7 +247,7 @@ hsh = None try: with open(path, 'rb') as f: - f.seek(-_hshlen, 2) + f.seek(-_hshlen, io.SEEK_END) if f.tell() > len(revmap.HEADER): hsh = f.read(_hshlen) except IOError: