本文整理汇总了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')
示例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')
示例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')
示例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')
示例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')
示例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')
示例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')
示例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')
示例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')