changeset 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 79d8e7926a04
children 49d65663d7e4
files hgext/largefiles/remotestore.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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')