state: fix usage of an unassigned variable
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 22 May 2018 00:22:23 +0530
changeset 38126 bdc4079ceb16
parent 38125 6ef01102ebff
child 38127 b7e5c53a779e
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
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):