本文整理汇总了Python中jarn.mkrelease.scm.SCMFactory.get_scm_from_sandbox方法的典型用法代码示例。如果您正苦于以下问题:Python SCMFactory.get_scm_from_sandbox方法的具体用法?Python SCMFactory.get_scm_from_sandbox怎么用?Python SCMFactory.get_scm_from_sandbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jarn.mkrelease.scm.SCMFactory
的用法示例。
在下文中一共展示了SCMFactory.get_scm_from_sandbox方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_buildout_url
# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_sandbox [as 别名]
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
# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_sandbox [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')
示例3: testGetGit
# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_sandbox [as 别名]
def testGetGit(self):
scms = SCMFactory()
self.destroy(name='svn')
self.assertEqual(scms.get_scm_from_sandbox(self.packagedir).name, 'git')
示例4: testGetSubversion
# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_sandbox [as 别名]
def testGetSubversion(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_sandbox(self.clonedir).name, 'svn')
示例5: testGetMercurial
# 需要导入模块: from jarn.mkrelease.scm import SCMFactory [as 别名]
# 或者: from jarn.mkrelease.scm.SCMFactory import get_scm_from_sandbox [as 别名]
def testGetMercurial(self):
scms = SCMFactory()
self.assertEqual(scms.get_scm_from_sandbox(self.packagedir).name, 'hg')