# HG changeset patch # User Anton Shestakov # Date 1575882116 -25200 # Node ID 25532ce787d935de5f0ce9470cbcaca6969e4b5f # Parent 588b3484c131f83f6624b232216d2d1c549c6e32 state: there's no _unpack in struct Caught by pytype. diff -r 588b3484c131 -r 25532ce787d9 hgext3rd/evolve/state.py --- a/hgext3rd/evolve/state.py Sun Sep 29 11:47:18 2019 +0530 +++ b/hgext3rd/evolve/state.py Mon Dec 09 16:01:56 2019 +0700 @@ -114,7 +114,7 @@ repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)' % len(versionblob)) return None - version = struct._unpack(b'>I', versionblob)[0] + version = struct.unpack(b'>I', versionblob)[0] if version != 0: msg = _(b'unknown evolvestate version %i') % version raise error.Abort(msg, hint=_(b'upgrade your evolve')) @@ -125,7 +125,7 @@ while off < end: rtype = data[off] off += 1 - length = struct._unpack(b'>I', data[off:(off + 4)])[0] + length = struct.unpack(b'>I', data[off:(off + 4)])[0] off += 4 record = data[off:(off + length)] off += length