コード例 #1
0
 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')
コード例 #2
0
 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')
コード例 #3
0
 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
0
 def testSwitchRemoteBranch(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.clone()
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), 'default')
     self.assertEqual(scm.switch_branch(self.clonedir, '2.x'), 0)
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), '2.x')
コード例 #5
0
 def testGetRemoteBranch(self):
     scm = Mercurial()
     self.clone()
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), 'default')
コード例 #6
0
 def testGetLocalBranchFromBranch(self):
     scm = Mercurial()
     self.branch(self.packagedir, '2.x')
     self.assertEqual(scm.get_branch_from_sandbox(self.packagedir), '2.x')
コード例 #7
0
 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')
コード例 #8
0
 def testGetRemoteBranch(self):
     scm = Mercurial()
     self.clone()
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), 'default')
コード例 #9
0
 def testGetLocalBranchFromBranch(self):
     scm = Mercurial()
     self.branch(self.packagedir, '2.x')
     self.assertEqual(scm.get_branch_from_sandbox(self.packagedir), '2.x')
コード例 #10
0
 def testGetLocalBranch(self):
     scm = Mercurial()
     self.assertEqual(scm.get_branch_from_sandbox(self.packagedir), "default")