Patchwork D3653: state: removing remaining instances of opts class variable

login
register
mail settings
Submitter phabricator
Date May 24, 2018, 10:25 p.m.
Message ID <f7fc00732dad10eb32be621152877c35@localhost.localdomain>
Download mbox | patch
Permalink /patch/31848/
State Not Applicable
Headers show

Comments

phabricator - May 24, 2018, 10:25 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6f67bfe4b82f: state: removing remaining instances of opts class variable (authored by pulkit, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D3653?vs=8884&id=8887#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3653?vs=8884&id=8887

REVISION DETAIL
  https://phab.mercurial-scm.org/D3653

AFFECTED FILES
  mercurial/state.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, martinvonz
Cc: martinvonz, mercurial-devel

Patch

diff --git a/mercurial/state.py b/mercurial/state.py
--- a/mercurial/state.py
+++ b/mercurial/state.py
@@ -40,10 +40,9 @@ 
     disk.
     """
 
-    def __init__(self, repo, fname, opts=None):
+    def __init__(self, repo, fname):
         """ repo is the repo object
         fname is the file name in which data should be stored in .hg directory
-        opts is a dictionary of data of the statefile
         """
         self._repo = repo
         self.fname = fname
@@ -63,7 +62,7 @@ 
 
         with self._repo.vfs(self.fname, 'wb', atomictemp=True) as fp:
             fp.write('%d\n' % version)
-            cbor.dump(self.opts, fp, canonical=True)
+            cbor.dump(data, fp, canonical=True)
 
     def _read(self):
         """reads the state file and returns a dictionary which contain