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