Mercurial > hg-stable
changeset 38178:6f67bfe4b82f
state: removing remaining instances of opts class variable
The cmdstate class used to have a class variable opts which used to be a dict
which stored all the data for the state. Recent cleanups removed the use of that
variable. There were couple of instances left which are removed by this patch.
Differential Revision: https://phab.mercurial-scm.org/D3653
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 25 May 2018 01:46:06 +0530 |
parents | bd7a3fa71a72 |
children | 009aa4af5093 |
files | mercurial/state.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/state.py Thu May 24 23:26:28 2018 +0900 +++ b/mercurial/state.py Fri May 25 01:46:06 2018 +0530 @@ -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