# Path: sumatra/core.py
# def component_type(cls):
#     """Class decorator to define base types for components.
# 
#     Use this decorator to register a base type of a Sumatra component. Concrete components
#     should subclass from this component type to then be registered as a Sumatra component.
# 
#     Not to be used when writing Sumatra plug-ins! For that, please use the `component`
#     decorator.
# 
#     Example:
#     @component_type
#     class MyComponentBase(object):
#         pass
# 
#     @component
#     class MyConcreteComponent(MyComponentBase):
#         pass
#     """
#     for base_type in _Registry().components:
#         if issubclass(cls, base_type):
#             msg = "{cls} is a subclass of already registered component type {base} and " \
#                   "hence could not be registered as component type." \
#                   .format(**{'cls': cls, 'base': base_type})
#             raise TypeError(msg)
#     _Registry().add_component_type(cls)
#     return cls


from builtins import object
from sumatra.core import component_type
import os.path

    def __setstate__(self, state):
        """For unpickling"""
        self.__init__(state['url'])
        self.upstream = state['upstream']

    @property
    def vcs_type(self):
        return self.__class__.__name__[:-10]  # strip off "Repository"

    @property
    def exists(self):
        """Does the repository represented by this object actually exist?"""
        raise NotImplementedError

    def checkout(self, path="."):
        """
        Clone a repository ("checkout" in Subversion) from *self.url* to
        the local filesystem at *path*.

        """
        raise NotImplementedError

    def get_working_copy(self, path=None):
        """
        Return a :class:`WorkingCopy` object corresponding to a checkout of this repository.
        """
        raise NotImplementedError



# Path: sumatra/core.py
# def component_type(cls):
#     """Class decorator to define base types for components.
# 
#     Use this decorator to register a base type of a Sumatra component. Concrete components
#     should subclass from this component type to then be registered as a Sumatra component.
# 
#     Not to be used when writing Sumatra plug-ins! For that, please use the `component`
#     decorator.
# 
#     Example:
#     @component_type
#     class MyComponentBase(object):
#         pass
# 
#     @component
#     class MyConcreteComponent(MyComponentBase):
#         pass
#     """
#     for base_type in _Registry().components:
#         if issubclass(cls, base_type):
#             msg = "{cls} is a subclass of already registered component type {base} and " \
#                   "hence could not be registered as component type." \
#                   .format(**{'cls': cls, 'base': base_type})
#             raise TypeError(msg)
#     _Registry().add_component_type(cls)
#     return cls


# Path: sumatra/versioncontrol/base.py
from builtins import object
from sumatra.core import component_type
import os.path


    def __setstate__(self, state):
        """For unpickling"""
        self.__init__(state['url'])
        self.upstream = state['upstream']

    @property
    def vcs_type(self):
        return self.__class__.__name__[:-10]  # strip off "Repository"

    @property
    def exists(self):
        """Does the repository represented by this object actually exist?"""
        raise NotImplementedError

    def checkout(self, path="."):
        """
        Clone a repository ("checkout" in Subversion) from *self.url* to
        the local filesystem at *path*.

        """
        raise NotImplementedError

    def get_working_copy(self, path=None):
        """
        Return a :class:`WorkingCopy` object corresponding to a checkout of this repository.
        """
        raise NotImplementedError



@component_type