示例#1
0
 def testSwitchBranch(self):
     scm = Subversion(Process(quiet=True))
     trunkid = 'file://%s/trunk' % self.packagedir
     branchid = 'file://%s/branches/2.x' % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), trunkid)
     self.assertEqual(scm.switch_branch(self.clonedir, branchid), 0)
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), branchid)
示例#2
0
 def testGetBranchFromBranchSubdir(self):
     scm = Subversion()
     branchid = "file://%s/branches/2.x" % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(
         scm.get_branch_from_sandbox(join(self.branchdir, "testpackage")), "file://%s/branches/2.x" % self.packagedir
     )
示例#3
0
 def testTagIdFromBranch(self):
     scm = Subversion()
     branchid = 'file://%s/branch/2.x' % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(scm.get_branch_from_sandbox(self.branchdir),
         'file://%s/branch/2.x' % self.packagedir)
     self.assertEqual(scm.make_tagid(self.branchdir, '2.6'),
         'file://%s/tag/2.6' % self.packagedir)
示例#4
0
 def testSwitchSameBranch(self):
     scm = Subversion()
     trunkid = 'file://%s/trunk' % self.packagedir
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), trunkid)
     self.assertEqual(scm.switch_branch(self.clonedir, trunkid), 0)
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir), trunkid)
示例#5
0
 def testGetBranchFromBranchSubdir(self):
     scm = Subversion()
     branchid = 'file://%s/branches/2.x' % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(scm.get_branch_from_sandbox(join(self.branchdir, 'testpackage')),
         'file://%s/branches/2.x' % self.packagedir)
 def testGetBranchFromBranch(self):
     scm = Subversion()
     branchid = 'file://%s/branches/2.x' % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(scm.get_branch_from_sandbox(self.branchdir),
         'file://%s/branches/2.x' % self.packagedir)
示例#7
0
 def testGetBranchFromSubdir(self):
     scm = Subversion()
     self.assertEqual(scm.get_branch_from_sandbox(join(self.clonedir, 'testpackage')),
         'file://%s/trunk' % self.packagedir)
示例#8
0
 def testGetBranch(self):
     scm = Subversion()
     self.assertEqual(scm.get_branch_from_sandbox(self.clonedir),
         'file://%s/trunk' % self.packagedir)
示例#9
0
 def testTagIdFromBranch(self):
     scm = Subversion()
     branchid = "file://%s/branches/2.x" % self.packagedir
     self.branch(self.clonedir, branchid)
     self.assertEqual(scm.get_branch_from_sandbox(self.branchdir), "file://%s/branches/2.x" % self.packagedir)
     self.assertEqual(scm.make_tagid(self.branchdir, "2.6"), "file://%s/tags/2.6" % self.packagedir)