'Create a new repository.
:param path: Path in which to create the repository
:param mkdir: Whether to create the directory
:return: `Repo` instance'

@classmethod
def init(cls, path, mkdir=False):

    if mkdir:
        os.mkdir(path)
    controldir = os.path.join(path, CONTROLDIR)
    os.mkdir(controldir)
    cls._init_maybe_bare(controldir, False)
    return cls(path)
