本文整理汇总了Python中jarn.mkrelease.scm.SCMFactory类的典型用法代码示例。如果您正苦于以下问题:Python SCMFactory类的具体用法?Python SCMFactory怎么用?Python SCMFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SCMFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_buildout_url
def _get_buildout_url():
"""Get the base buildout url
"""
scm = SCMFactory()
wc = scm.get_scm_from_sandbox(os.getcwd())
sandbox_url = wc.get_url_from_sandbox(os.getcwd())
base_dir = wc.get_base_url_from_sandbox(os.getcwd())
return sandbox_url, base_dir
示例2: testGetGitifySubversion
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')
示例3: testGetGit
def testGetGit(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_type('git').name, 'git')
示例4: testGetMercurial
def testGetMercurial(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_type('hg').name, 'hg')
示例5: testGetSubversion
def testGetSubversion(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_type('svn').name, 'svn')
示例6: testGetFromSandbox
def testGetFromSandbox(self):
scms = SCMFactory()
self.destroy(name='svn')
self.assertEqual(scms.get_scm(None, self.packagedir).name, 'hg')
示例7: testGetHttpsByPath
def testGetHttpsByPath(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_url('https://jarn.com/hg/public/foo').name, 'hg')
示例8: testGetSshByExtension
def testGetSshByExtension(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_url('ssh://jarn.com/public/foo.git').name, 'git')
示例9: testGetSvnSsh
def testGetSvnSsh(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_url('svn+ssh://').name, 'svn')
示例10: testGetFromFileUrl
def testGetFromFileUrl(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm(None, 'file://'+self.packagedir).name, 'git')
示例11: testGetFromUrl
def testGetFromUrl(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm(None, 'git://jarn.com/public').name, 'git')
示例12: testGetFromType
def testGetFromType(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm('git', self.packagedir).name, 'git')
示例13: testGetFromSandbox
def testGetFromSandbox(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm(None, self.clonedir).name, 'svn')
示例14: testGetMercurial
def testGetMercurial(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_sandbox(self.packagedir).name, 'hg')
示例15: testGetFromSshUrl
def testGetFromSshUrl(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm(None, '[email protected]:Jarn/jarn.mkrelease').name, 'git')