# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1526928743 -19800 # Node ID bdc4079ceb163ac5515363f494f661677e42da51 # Parent 6ef01102ebfff6e1fdfa54bff6ebaebe27e37b7b state: fix usage of an unassigned variable The variable iv was used in earlier iterations of the patches and was dropped since we made sure 'version' is always int. This usage of 'iv' should have been replaced by 'version' in the original patch only. Differential Revision: https://phab.mercurial-scm.org/D3640 diff -r 6ef01102ebff -r bdc4079ceb16 mercurial/state.py --- a/mercurial/state.py Sun May 20 18:53:03 2018 +0530 +++ b/mercurial/state.py Tue May 22 00:22:23 2018 +0530 @@ -62,7 +62,7 @@ " an integer") with self._repo.vfs(self.fname, 'wb', atomictemp=True) as fp: - fp.write('%d\n' % iv) + fp.write('%d\n' % version) cbor.dump(self.opts, fp, canonical=True) def _read(self):