本文整理汇总了Python中jarn.mkrelease.scm.Mercurial类的典型用法代码示例。如果您正苦于以下问题:Python Mercurial类的具体用法?Python Mercurial怎么用?Python Mercurial使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mercurial类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testSwitchBranch
def testSwitchBranch(self):
scm = Mercurial(Process(quiet=True))
self.branch(self.packagedir, '2.x')
self.modify(self.packagedir)
self.assertEqual(scm.checkin_sandbox(self.packagedir, 'testpackage', '0.0', True), 0)
self.assertEqual(scm.get_branch_from_sandbox(self.packagedir), '2.x')
self.assertEqual(scm.switch_branch(self.packagedir, 'default'), 0)
self.assertEqual(scm.get_branch_from_sandbox(self.packagedir), 'default')
示例2: testCommitAndPushDirtyRemoteSandbox
def testCommitAndPushDirtyRemoteSandbox(self):
scm = Mercurial(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)
示例3: testSwitchBranch
def testSwitchBranch(self):
scm = Mercurial(Process(quiet=True))
self.branch(self.packagedir, "2.x")
self.modify(self.packagedir)
self.assertEqual(scm.commit_sandbox(self.packagedir, "testpackage", "0.0", True), 0)
self.assertEqual(scm.get_branch_from_sandbox(self.packagedir), "2.x")
self.assertEqual(scm.switch_branch(self.packagedir, "default"), 0)
self.assertEqual(scm.get_branch_from_sandbox(self.packagedir), "default")
示例4: testCheckinAndPushDirtyRemoteSandbox
def testCheckinAndPushDirtyRemoteSandbox(self):
scm = Mercurial(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)
示例5: testTagExists
def testTagExists(self):
scm = Mercurial()
self.tag(self.packagedir, '2.6')
self.assertEqual(scm.tag_exists(self.packagedir, '2.6'), True)
示例6: testTagDoesNotExist
def testTagDoesNotExist(self):
scm = Mercurial()
self.assertEqual(scm.tag_exists(self.packagedir, '2.6'), False)
示例7: testRemovedFile
def testRemovedFile(self):
scm = Mercurial()
self.remove(self.packagedir)
self.assertEqual(scm.is_unclean_sandbox(self.packagedir), True)
示例8: testNotExists
def testNotExists(self):
scm = Mercurial()
self.assertEqual(scm.is_valid_sandbox('foo'), False)
示例9: testGetVersion
def testGetVersion(self):
scm = Mercurial()
self.failIfEqual(scm.get_version(), '')
示例10: testSandbox
def testSandbox(self):
scm = Mercurial()
self.assertEqual(scm.is_valid_sandbox(self.packagedir), True)
示例11: testCheckinAndPushCleanRemoteSandbox
def testCheckinAndPushCleanRemoteSandbox(self):
scm = Mercurial(Process(quiet=True))
self.clone()
self.assertEqual(scm.checkin_sandbox(self.clonedir, 'testpackage', '2.6', True), 0)
示例12: testCheckinAndPushDirtyLocalSandbox
def testCheckinAndPushDirtyLocalSandbox(self):
scm = Mercurial(Process(quiet=True))
self.modify(self.packagedir)
self.assertEqual(scm.checkin_sandbox(self.packagedir, 'testpackage', '2.6', True), 0)
示例13: testFileUrl
def testFileUrl(self):
scm = Mercurial()
self.assertEqual(scm.is_valid_url('file://'), True)
示例14: testCheckinCleanSandbox
def testCheckinCleanSandbox(self):
scm = Mercurial(Process(quiet=True))
self.assertEqual(scm.checkin_sandbox(self.packagedir, 'testpackage', '2.6', False), 0)
示例15: testHttpsUrl
def testHttpsUrl(self):
scm = Mercurial()
self.assertEqual(scm.is_valid_url('https://'), True)