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


Python scm.Subversion类代码示例

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


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

示例1: testTagIdFromTag

 def testTagIdFromTag(self):
     scm = Subversion()
     tagid = 'file://%s/tag/2.6' % self.packagedir
     self.tag(self.clonedir, tagid)
     self.assertEqual(scm.tag_exists(self.tagdir, tagid), True)
     self.assertEqual(scm.make_tagid(self.tagdir, '2.7'),
         'file://%s/tag/2.7' % self.packagedir)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:7,代码来源:test_subversion.py

示例2: testGetBranchFromBranchSubdir

 def testGetBranchFromBranchSubdir(self):
     scm = Subversion()
     branchid = "file://%s/branches/2.x" % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(
         scm.get_branch_from_sandbox(join(self.branchdir, "testpackage")), "file://%s/branches/2.x" % self.packagedir
     )
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:7,代码来源:test_subversion.py

示例3: testSwitchBranch

 def testSwitchBranch(self):
     scm = Subversion(Process(quiet=True))
     trunkid = 'file://%s/trunk' % self.packagedir
     branchid = 'file://%s/branches/2.x' % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), trunkid)
     self.assertEqual(scm.switch_branch(self.clonedir, branchid), 0)
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), branchid)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:8,代码来源:test_subversion.py

示例4: testTagIdFromBranch

 def testTagIdFromBranch(self):
     scm = Subversion()
     branchid = 'file://%s/branch/2.x' % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(scm.get_branch_from_sandbox(self.branchdir),
         'file://%s/branch/2.x' % self.packagedir)
     self.assertEqual(scm.make_tagid(self.branchdir, '2.6'),
         'file://%s/tag/2.6' % self.packagedir)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:8,代码来源:test_subversion.py

示例5: testCreateExistingTag

 def testCreateExistingTag(self):
     scm = Subversion(Process(quiet=True))
     tagid = 'file://%s/tags/2.6' % self.packagedir
     self.assertEqual(scm.create_tag(self.clonedir, tagid, 'testpackage', '2.6', False), 0)
     self.assertEqual(scm.tag_exists(self.clonedir, tagid), True)
     # Note: This works! Subversion just copies stuff into a subdirectory...
     self.assertEqual(scm.create_tag(self.clonedir, tagid, 'testpackage', '2.6', False), 0)
     # Note: Only on the third attempt tagging fails
     self.assertRaises(SystemExit, scm.create_tag, self.clonedir, tagid, 'testpackage', '2.6', False)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:9,代码来源:test_subversion.py

示例6: testTreeConflict

 def testTreeConflict(self):
     # Requires Subversion >= 1.6
     def func(cmd):
         if cmd == 'svn --version':
             return 0, ['version 1.6.16']
         else:
             return 0, ['      C foo.py']
                        #      ^ 7th column
     scm = Subversion(MockProcess(func=func))
     self.assertEqual(scm.is_unclean_sandbox(self.clonedir), True)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:10,代码来源:test_subversion.py

示例7: testGitSshUrl

 def testGitSshUrl(self):
     scm = Subversion()
     self.assertEqual(scm.is_valid_url('[email protected]:Jarn/jarn.mkrelease'), False)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_subversion.py

示例8: testTagExists

 def testTagExists(self):
     scm = Subversion()
     tagid = 'file://%s/tags/2.6' % self.packagedir
     self.tag(self.clonedir, tagid)
     self.assertEqual(scm.tag_exists(self.clonedir, tagid), True)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:5,代码来源:test_subversion.py

示例9: testBadSandbox

 def testBadSandbox(self):
     scm = Subversion(Process(quiet=True))
     self.destroy(self.clonedir)
     # Note: The sandbox is reported as *clean*
     self.assertEqual(scm.is_unclean_sandbox(self.clonedir), False)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:5,代码来源:test_subversion.py

示例10: testGetRoot

 def testGetRoot(self):
     scm = Subversion()
     self.assertEqual(scm.get_root_from_sandbox(self.clonedir),
                      self.clonedir)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:4,代码来源:test_subversion.py

示例11: testCommitCleanSandbox

 def testCommitCleanSandbox(self):
     scm = Subversion(Process(quiet=True))
     self.assertEqual(scm.commit_sandbox(self.clonedir, 'testpackage', '2.6', False), 0)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_subversion.py

示例12: testEmptyBranchId

 def testEmptyBranchId(self):
     scm = Subversion()
     self.assertEqual(scm.make_branchid(self.clonedir, ''), '')
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_subversion.py

示例13: testAbsPathBranchId

 def testAbsPathBranchId(self):
     scm = Subversion()
     self.dirstack.push(self.packagedir)
     branchid = 'file:branches/2.x'
     self.assertEqual(scm.make_branchid(self.clonedir, branchid),
         'file://%s/branches/2.x' % self.packagedir)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_subversion.py

示例14: testMakeBranchId

 def testMakeBranchId(self):
     scm = Subversion()
     branchid = 'file://%s/branches/2.x' % self.packagedir
     self.assertEqual(scm.make_branchid(self.clonedir, branchid), branchid)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:4,代码来源:test_subversion.py

示例15: testCloneUrl

 def testCloneUrl(self):
     scm = Subversion(Process(quiet=True))
     self.assertEqual(scm.clone_url('file://'+self.packagedir, 'testclone2'), 0)
     self.assertEqual(isdir('testclone2'), True)
开发者ID:SalesSeek,项目名称:jarn.mkrelease,代码行数:4,代码来源:test_subversion.py


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