本文整理汇总了Python中jarn.mkrelease.scm.Subversion类的典型用法代码示例。如果您正苦于以下问题:Python Subversion类的具体用法?Python Subversion怎么用?Python Subversion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Subversion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testTagIdFromTag
def testTagIdFromTag(self):
scm = Subversion()
tagid = 'file://%s/tag/2.6' % self.packagedir
self.tag(self.clonedir, tagid)
self.assertEqual(scm.tag_exists(self.tagdir, tagid), True)
self.assertEqual(scm.make_tagid(self.tagdir, '2.7'),
'file://%s/tag/2.7' % self.packagedir)
示例2: testGetBranchFromBranchSubdir
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: testSwitchBranch
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)
示例4: testTagIdFromBranch
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)
示例5: testCreateExistingTag
def testCreateExistingTag(self):
scm = Subversion(Process(quiet=True))
tagid = 'file://%s/tags/2.6' % self.packagedir
self.assertEqual(scm.create_tag(self.clonedir, tagid, 'testpackage', '2.6', False), 0)
self.assertEqual(scm.tag_exists(self.clonedir, tagid), True)
# Note: This works! Subversion just copies stuff into a subdirectory...
self.assertEqual(scm.create_tag(self.clonedir, tagid, 'testpackage', '2.6', False), 0)
# Note: Only on the third attempt tagging fails
self.assertRaises(SystemExit, scm.create_tag, self.clonedir, tagid, 'testpackage', '2.6', False)
示例6: testTreeConflict
def testTreeConflict(self):
# Requires Subversion >= 1.6
def func(cmd):
if cmd == 'svn --version':
return 0, ['version 1.6.16']
else:
return 0, [' C foo.py']
# ^ 7th column
scm = Subversion(MockProcess(func=func))
self.assertEqual(scm.is_unclean_sandbox(self.clonedir), True)
示例7: testGitSshUrl
def testGitSshUrl(self):
scm = Subversion()
self.assertEqual(scm.is_valid_url('[email protected]:Jarn/jarn.mkrelease'), False)
示例8: testTagExists
def testTagExists(self):
scm = Subversion()
tagid = 'file://%s/tags/2.6' % self.packagedir
self.tag(self.clonedir, tagid)
self.assertEqual(scm.tag_exists(self.clonedir, tagid), True)
示例9: testBadSandbox
def testBadSandbox(self):
scm = Subversion(Process(quiet=True))
self.destroy(self.clonedir)
# Note: The sandbox is reported as *clean*
self.assertEqual(scm.is_unclean_sandbox(self.clonedir), False)
示例10: testGetRoot
def testGetRoot(self):
scm = Subversion()
self.assertEqual(scm.get_root_from_sandbox(self.clonedir),
self.clonedir)
示例11: testCommitCleanSandbox
def testCommitCleanSandbox(self):
scm = Subversion(Process(quiet=True))
self.assertEqual(scm.commit_sandbox(self.clonedir, 'testpackage', '2.6', False), 0)
示例12: testEmptyBranchId
def testEmptyBranchId(self):
scm = Subversion()
self.assertEqual(scm.make_branchid(self.clonedir, ''), '')
示例13: testAbsPathBranchId
def testAbsPathBranchId(self):
scm = Subversion()
self.dirstack.push(self.packagedir)
branchid = 'file:branches/2.x'
self.assertEqual(scm.make_branchid(self.clonedir, branchid),
'file://%s/branches/2.x' % self.packagedir)
示例14: testMakeBranchId
def testMakeBranchId(self):
scm = Subversion()
branchid = 'file://%s/branches/2.x' % self.packagedir
self.assertEqual(scm.make_branchid(self.clonedir, branchid), branchid)
示例15: testCloneUrl
def testCloneUrl(self):
scm = Subversion(Process(quiet=True))
self.assertEqual(scm.clone_url('file://'+self.packagedir, 'testclone2'), 0)
self.assertEqual(isdir('testclone2'), True)