#12530: Improve the sage-combinat script to support guards for developpers
versions
of Sage
------------------------------+---------------------------------------------
Reporter: nthiery | Owner: leif
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.0
Component: scripts | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Florent Hivert | Author: Nicolas M. ThiƩry
Merged: | Dependencies:
------------------------------+---------------------------------------------
Comment(by nthiery):
The same, nicer looking:
{{{
#!diff
diff --git a/sage-combinat b/sage-combinat
--- a/sage-combinat
+++ b/sage-combinat
@@ -5,6 +5,7 @@ import re
from optparse import OptionParser
from sys import stderr
from subprocess import Popen, PIPE
+from warnings import warn
if "SAGE_ROOT" in os.environ:
sage = os.environ["SAGE_ROOT"]+"/sage"
@@ -294,7 +295,11 @@ def qselect_backward_compatibility_patch
if not re.match(version_regexp+"$", guard):
if re.match(version_regexp, guard):
# Catch erroneous guards like 4_3_3:
- error("Invalid version guard in the mercurial queue:
%s"%guard)
+ message = "Invalid version guard in the mercurial queue:
%s"%guard
+ if options.force:
+ warn(message)
+ else:
+ error(message)
return False
if cmp_sage_versions(guard, sage_version) > 0:
info("Keep backward compatibility patches for sage
"+re.sub("_",".",guard))
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12530#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.