comparison hgext/largefiles/remotestore.py @ 28442:3be2e89c5d9f

largefiles: add abstract methods in remotestore class Methods _put, _get, _stat were used in remotestore class as abstract expecting that subclass would implement them. This commit makes this fact explicit.
author liscju <piotr.listkiewicz@gmail.com>
date Thu, 10 Mar 2016 10:56:02 +0100
parents 56b2bcea2529
children 032c4c2f802a
comparison
equal deleted inserted replaced
28441:79d8e7926a04 28442:3be2e89c5d9f
94 'statlfile (%r)' % stat) 94 'statlfile (%r)' % stat)
95 95
96 def batch(self): 96 def batch(self):
97 '''Support for remote batching.''' 97 '''Support for remote batching.'''
98 return wireproto.remotebatch(self) 98 return wireproto.remotebatch(self)
99
100 def _put(self, hash, fd):
101 '''Put file with the given hash in the remote store.'''
102 raise NotImplementedError('abstract method')
103
104 def _get(self, hash):
105 '''Get file with the given hash from the remote store.'''
106 raise NotImplementedError('abstract method')
107
108 def _stat(self, hashes):
109 '''Get information about availability of files specified by
110 hashes in the remote store. Return dictionary mapping hashes
111 to return code where 0 means that file is available, other
112 values if not.'''
113 raise NotImplementedError('abstract method')