Mercurial > hg
comparison mercurial/scmutil.py @ 31285:1937671105bc
filecache: make 'join' abstract
All subclasses redefine this method, so we can make it abstract.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 05 Aug 2016 14:24:53 +0200 |
parents | 0f31830fbfc4 |
children | 719e64bf9ec2 |
comparison
equal
deleted
inserted
replaced
31284:74cbbd5420ba | 31285:1937671105bc |
---|---|
879 | 879 |
880 Users should subclass filecache and provide their own version of this | 880 Users should subclass filecache and provide their own version of this |
881 function to call the appropriate join function on 'obj' (an instance | 881 function to call the appropriate join function on 'obj' (an instance |
882 of the class that its member function was decorated). | 882 of the class that its member function was decorated). |
883 """ | 883 """ |
884 return obj.join(fname) | 884 raise NotImplementedError |
885 | 885 |
886 def __call__(self, func): | 886 def __call__(self, func): |
887 self.func = func | 887 self.func = func |
888 self.name = func.__name__ | 888 self.name = func.__name__ |
889 return self | 889 return self |