Did I find the right examples for you? yes no

All Samples(21)  |  Call(19)  |  Derive(0)  |  Import(2)
Returns ``Repository`` class identified by the given alias or raises
VCSError if alias is not recognized or backend class cannot be imported.

        def get_backend(alias):
    """
    Returns ``Repository`` class identified by the given alias or raises
    VCSError if alias is not recognized or backend class cannot be imported.
    """
    if alias not in settings.BACKENDS:
        raise VCSError("Given alias '%s' is not recognized! Allowed aliases:\n"
            "%s" % (alias, pformat(settings.BACKENDS.keys())))
    backend_path = settings.BACKENDS[alias]
    klass = import_class(backend_path)
    return klass
        


src/d/j/django-ci-HEAD/ci/models.py   django-ci(Download)
    def get_vcs_backend(self):
        return vcs.get_backend(self.vcs_type)
 
    # XXX too many similar names
 

src/v/c/vcs-0.4.0/vcs/tests/test_vcs.py   vcs(Download)
import shutil
 
from vcs import VCSError, get_repo, get_backend
from vcs.backends.hg import MercurialRepository
from vcs.utils.compat import unittest
    def test_get_backend(self):
        hg = get_backend('hg')
        self.assertEqual(hg, MercurialRepository)
 
    def test_alias_detect_hg(self):
        alias = 'hg'
        path = TEST_HG_REPO
        backend = get_backend(alias)
    def test_alias_detect_git(self):
        alias = 'git'
        path = TEST_GIT_REPO
        backend = get_backend(alias)
        repo = backend(path)
    def test_get_repo(self):
        alias = 'hg'
        path = TEST_HG_REPO
        backend = get_backend(alias)
        repo = backend(path)

src/v/c/vcs-HEAD/vcs/tests/test_vcs.py   vcs(Download)
import shutil
 
from vcs import VCSError, get_repo, get_backend
from vcs.backends.hg import MercurialRepository
from vcs.utils.compat import unittest
    def test_get_backend(self):
        hg = get_backend('hg')
        self.assertEqual(hg, MercurialRepository)
 
    def test_alias_detect_hg(self):
        alias = 'hg'
        path = TEST_HG_REPO
        backend = get_backend(alias)
    def test_alias_detect_git(self):
        alias = 'git'
        path = TEST_GIT_REPO
        backend = get_backend(alias)
        repo = backend(path)
    def test_get_repo(self):
        alias = 'hg'
        path = TEST_HG_REPO
        backend = get_backend(alias)
        repo = backend(path)

src/v/c/vcs-HEAD/vcs/tests/test_inmemchangesets.py   vcs(Download)
    def get_backend(self):
        return vcs.get_backend(self.backend_alias)
 
    def setUp(self):
        Backend = self.get_backend()
    def get_backend(self):
        return vcs.get_backend(self.backend_alias)
 
    def get_commits(self):
        """

src/v/c/vcs-HEAD/vcs/tests/base.py   vcs(Download)
    def get_backend(cls):
        return vcs.get_backend(cls.backend_alias)
 
    @classmethod
    def _get_commits(cls):

src/v/c/vcs-0.4.0/vcs/tests/test_inmemchangesets.py   vcs(Download)
    def get_backend(self):
        return vcs.get_backend(self.backend_alias)
 
    def setUp(self):
        Backend = self.get_backend()
    def get_backend(self):
        return vcs.get_backend(self.backend_alias)
 
    def get_commits(self):
        """

src/v/c/vcs-0.4.0/vcs/tests/base.py   vcs(Download)
    def get_backend(cls):
        return vcs.get_backend(cls.backend_alias)
 
    @classmethod
    def _get_commits(cls):