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


Python scm.Git类代码示例

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


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

示例1: testSwitchRemoteBranch

 def testSwitchRemoteBranch(self):
     scm = Git(Process(quiet=True))
     self.branch(self.packagedir, "2.x")
     self.clone()
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), "master")
     self.assertEqual(scm.switch_branch(self.clonedir, "2.x"), 0)
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), "2.x")
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:7,代码来源:test_git.py

示例2: testCheckinAndPushDirtyRemoteSandbox

 def testCheckinAndPushDirtyRemoteSandbox(self):
     scm = Git(Process(quiet=True))
     self.clone()
     self.modify(self.clonedir)
     self.assertEqual(scm.checkin_sandbox(self.clonedir, 'testpackage', '2.6', True), 0)
     self.verify(self.clonedir)
     self.update(self.packagedir)
     self.verify(self.packagedir)
开发者ID:,项目名称:,代码行数:8,代码来源:

示例3: testCommitAndPushDirtyRemoteSandbox

 def testCommitAndPushDirtyRemoteSandbox(self):
     scm = Git(Process(quiet=True))
     self.clone()
     self.modify(self.clonedir)
     self.assertEqual(scm.commit_sandbox(self.clonedir, "testpackage", "2.6", True), 0)
     self.verify(self.clonedir)
     self.update(self.packagedir)
     self.verify(self.packagedir)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:8,代码来源:test_git.py

示例4: testCreateTag

 def testCreateTag(self):
     scm = Git()
     self.assertEqual(scm.tag_exists(self.packagedir, "2.6"), False)
     self.assertEqual(scm.create_tag(self.packagedir, "2.6", "testpackage", "2.6", False), 0)
     self.assertEqual(scm.tag_exists(self.packagedir, "2.6"), True)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:5,代码来源:test_git.py

示例5: testTagExists

 def testTagExists(self):
     scm = Git()
     self.tag(self.packagedir, "2.6")
     self.assertEqual(scm.tag_exists(self.packagedir, "2.6"), True)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:4,代码来源:test_git.py

示例6: testDeletedButTrackedFile

 def testDeletedButTrackedFile(self):
     scm = Git()
     self.delete(self.packagedir)
     # Note: The sandbox is reported as unclean
     self.assertEqual(scm.is_unclean_sandbox(self.packagedir), True)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:5,代码来源:test_git.py

示例7: testFileUrl

 def testFileUrl(self):
     scm = Git()
     self.assertEqual(scm.is_valid_url("file://"), True)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_git.py

示例8: testNotExists

 def testNotExists(self):
     scm = Git()
     self.assertEqual(scm.is_valid_sandbox("foo"), False)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_git.py

示例9: testGetVersion

 def testGetVersion(self):
     scm = Git()
     self.assertNotEqual(scm.get_version(), "")
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_git.py

示例10: testCreateAndPushRemoteTag

 def testCreateAndPushRemoteTag(self):
     scm = Git(Process(quiet=True))
     self.clone()
     self.assertEqual(scm.create_tag(self.clonedir, "2.6", "testpackage", "2.6", True), 0)
     self.assertEqual(scm.tag_exists(self.clonedir, "2.6"), True)
     self.assertEqual(scm.tag_exists(self.packagedir, "2.6"), True)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:6,代码来源:test_git.py

示例11: testEmptyBranchId

 def testEmptyBranchId(self):
     scm = Git()
     self.assertEqual(scm.make_branchid(self.packagedir, ""), "master")
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_git.py

示例12: testMakeBranchId

 def testMakeBranchId(self):
     scm = Git()
     self.assertEqual(scm.make_branchid(self.packagedir, "2.x"), "2.x")
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_git.py

示例13: testCloneUrl

 def testCloneUrl(self):
     scm = Git(Process(quiet=True))
     self.assertEqual(scm.clone_url(self.packagedir, "testclone"), 0)
     self.assertEqual(isdir("testclone"), True)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:4,代码来源:test_git.py

示例14: testBadProtocol

 def testBadProtocol(self):
     scm = Git()
     self.assertEqual(scm.is_valid_url("svn://"), False)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:3,代码来源:test_git.py

示例15: testCommitAndPushCleanRemoteSandbox

 def testCommitAndPushCleanRemoteSandbox(self):
     scm = Git(Process(quiet=True))
     self.clone()
     self.assertEqual(scm.commit_sandbox(self.clonedir, "testpackage", "2.6", True), 0)
开发者ID:Jarn,项目名称:jarn.mkrelease,代码行数:4,代码来源:test_git.py


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