1. Augie Fackler
  2. hgsubversion


Dan Villiom Podlaski Christiansen  committed 70aa5bf

subvertpy wrapper: rename AbstractEditor to BaseEditor

We actually instantiate it, so the name is horribly wrong. While at
it, I gave the two subclasses __slots__ entries as well.

  • Participants
  • Parent commits f3d900d
  • Branches default

Comments (0)

Files changed (1)

File hgsubversion/svnwrap/subvertpy_wrapper.py

View file
         if self.copyfrom_path:
             self.copyfrom_path = intern(self.copyfrom_path)
-class AbstractEditor(object):
+class BaseEditor(object):
     __slots__ = ('editor', 'baton')
     def __init__(self, editor, baton=None):
     def close(self):
         del self.editor
-class FileEditor(AbstractEditor):
+class FileEditor(BaseEditor):
+    __slots__ = ()
     def __init__(self, editor, baton):
         super(FileEditor, self).__init__(editor, baton)
         self.editor.close_file(self.baton, checksum)
         super(FileEditor, self).close()
-class DirectoryEditor(AbstractEditor):
+class DirectoryEditor(BaseEditor):
+    __slots__ = ()
     def __init__(self, editor, baton):
         super(DirectoryEditor, self).__init__(editor, baton)
     def get_replay(self, revision, editor, oldestrev=0):
-            self.remote.replay(revision, oldestrev, AbstractEditor(editor))
+            self.remote.replay(revision, oldestrev, BaseEditor(editor))
         except (SubversionException, NotImplementedError), e: # pragma: no cover
             # can I depend on this number being constant?
             if (isinstance(e, NotImplementedError) or
     def get_revision(self, revision, editor):
         ''' feed the contents of the given revision to the given editor '''
         reporter = self.remote.do_update(revision, '', True,
-                                         AbstractEditor(editor))
+                                         BaseEditor(editor))
         reporter.set_path('', revision, True)