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.
--- a/hgext/largefiles/remotestore.py Sun Feb 14 18:18:57 2016 +0100
+++ b/hgext/largefiles/remotestore.py Thu Mar 10 10:56:02 2016 +0100
@@ -96,3 +96,18 @@
def batch(self):
'''Support for remote batching.'''
return wireproto.remotebatch(self)
+
+ def _put(self, hash, fd):
+ '''Put file with the given hash in the remote store.'''
+ raise NotImplementedError('abstract method')
+
+ def _get(self, hash):
+ '''Get file with the given hash from the remote store.'''
+ raise NotImplementedError('abstract method')
+
+ def _stat(self, hashes):
+ '''Get information about availability of files specified by
+ hashes in the remote store. Return dictionary mapping hashes
+ to return code where 0 means that file is available, other
+ values if not.'''
+ raise NotImplementedError('abstract method')