当前位置: 首页>>代码示例>>Python>>正文


Python SCMFactory.get_scm_from_url方法代码示例

本文整理汇总了Python中jarn.mkrelease.scm.SCMFactory.get_scm_from_url方法的典型用法代码示例。如果您正苦于以下问题:Python SCMFactory.get_scm_from_url方法的具体用法?Python SCMFactory.get_scm_from_url怎么用?Python SCMFactory.get_scm_from_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jarn.mkrelease.scm.SCMFactory的用法示例。


在下文中一共展示了SCMFactory.get_scm_from_url方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testGetGitifySubversion

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
    def testGetGitifySubversion(self):
        """
        Support git-svn-helpers/gitify style dual git/svn checkouts/clones.
        """
        # Simulate a git-svn-helpers/gitify style dual svn/git checkout/clone
        svn_url = urlparse.urlunsplit(('file', '', self.packagedir, '', ''))
        git_svn_clonedir = self.clonedir + '.git-svn'
        process = Process(quiet=True)
        process.system(
            'git svn clone -s {0} {1}'.format(svn_url, git_svn_clonedir))
        os.rename(
            os.path.join(git_svn_clonedir, '.git'),
            os.path.join(self.clonedir, '.git'))

        scms = SCMFactory()
        self.assertEqual(scms.get_scm_from_url(svn_url).name, 'svn')
        self.assertEqual(scms.get_scm_from_sandbox(self.clonedir).name, 'svn')
开发者ID:sixfeetup,项目名称:jarn.mkrelease,代码行数:19,代码来源:test_scmfactory.py

示例2: testGetRelativeFile

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetRelativeFile(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('file:var/dist/public/foo.git').name, 'git')
开发者ID:,项目名称:,代码行数:5,代码来源:

示例3: testGetHttpsByPath

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetHttpsByPath(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('https://jarn.com/hg/public/foo').name, 'hg')
开发者ID:,项目名称:,代码行数:5,代码来源:

示例4: testGetHttpByHostWithUser

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetHttpByHostWithUser(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('http://[email protected]/public/foo').name, 'hg')
开发者ID:,项目名称:,代码行数:5,代码来源:

示例5: testGetSshByExtension

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetSshByExtension(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('ssh://jarn.com/public/foo.git').name, 'git')
开发者ID:,项目名称:,代码行数:5,代码来源:

示例6: testGetRsync

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetRsync(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('rsync://').name, 'git')
开发者ID:,项目名称:,代码行数:5,代码来源:

示例7: testGetSvnSsh

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetSvnSsh(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('svn+ssh://').name, 'svn')
开发者ID:,项目名称:,代码行数:5,代码来源:

示例8: testGetHttpsGitHub

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetHttpsGitHub(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('https://[email protected]/jondoe/foo').name, 'git')
开发者ID:,项目名称:,代码行数:5,代码来源:

示例9: testGetSshGitHub

# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_url [as 别名]
 def testGetSshGitHub(self):
     scms = SCMFactory()
     self.assertEqual(scms.get_scm_from_url('ssh://[email protected]/jondoe/foo').name, 'git')
开发者ID:,项目名称:,代码行数:5,代码来源:


注:本文中的jarn.mkrelease.scm.SCMFactory.get_scm_from_url方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。