changeset 38159:bdc4079ceb16

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
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 22 May 2018 00:22:23 +0530
parents 6ef01102ebff
children b7e5c53a779e
files mercurial/state.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):