[asterisk-commits] mnicholson: branch mnicholson/fancy-versions r2415 - /asterisk/team/mnicholso...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 23 07:53:19 CDT 2011
Author: mnicholson
Date: Fri Sep 23 07:53:15 2011
New Revision: 2415
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2415
Log:
simplify matching of main branches
Modified:
asterisk/team/mnicholson/fancy-versions/lib/python/asterisk/TestConfig.py
Modified: asterisk/team/mnicholson/fancy-versions/lib/python/asterisk/TestConfig.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mnicholson/fancy-versions/lib/python/asterisk/TestConfig.py?view=diff&rev=2415&r1=2414&r2=2415
==============================================================================
--- asterisk/team/mnicholson/fancy-versions/lib/python/asterisk/TestConfig.py (original)
+++ asterisk/team/mnicholson/fancy-versions/lib/python/asterisk/TestConfig.py Fri Sep 23 07:53:15 2011
@@ -358,28 +358,19 @@
def svn_is_compatible(ast_version, svn):
def rev(r):
- # prepend "branch-" to certain version numbers
- if isinstance(branch, int) \
- or isinstance(branch, float) \
- or (isinstance(branch, str) \
- and '.' in branch \
- and not branch.startswith("branch-")):
-
- return AsteriskVersion("SVN-branch-%s-r%s" % (branch, r))
- else:
- return AsteriskVersion("SVN-%s-r%s" % (branch, r))
+ return AsteriskVersion("SVN-%s-r%s" % (branch, r))
branch = ast_version.branch
if "branch" in svn:
- branch = svn["branch"]
- if isinstance(branch, int) or isinstance(branch, float) or '.' in branch:
- if ast_version.branch != "branch-" + str(branch):
- self.why_not.append("svn branch mismatch: %s != %s" % (ast_version.branch, "branch-" + str(branch)))
- return False
- else:
- if ast_version.branch != branch:
- self.why_not.append("svn branch mismatch: %s != %s" % (ast_version.branch, branch))
- return False
+ branch = str(svn["branch"])
+
+ # prepend "branch-" to certain version numbers
+ if branch in ["1.4", "1.6.0", "1.6.1", "1.6.2", "1.8", "10"]:
+ branch = "branch-" + branch
+
+ if ast_version.branch != branch:
+ self.why_not.append("svn branch mismatch: %s != %s" % (ast_version.branch, branch))
+ return False
if "to" in svn:
if ast_version > rev(svn["to"]):
More information about the asterisk-commits
mailing list