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')
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)
def testCheckinAndPushDirtyLocalSandbox(self): scm = Mercurial(Process(quiet=True)) self.modify(self.packagedir) self.assertEqual(scm.checkin_sandbox(self.packagedir, 'testpackage', '2.6', True), 0)
def testCheckinAndPushCleanRemoteSandbox(self): scm = Mercurial(Process(quiet=True)) self.clone() self.assertEqual(scm.checkin_sandbox(self.clonedir, 'testpackage', '2.6', True), 0)
def testCheckinCleanSandbox(self): scm = Mercurial(Process(quiet=True)) self.assertEqual(scm.checkin_sandbox(self.packagedir, 'testpackage', '2.6', False), 0)