cwctl.py
branchstable
changeset 4696 ce3adab29aef
parent 4684 876a79ece6f7
child 4718 3dc3ad02d091
equal deleted inserted replaced
4695:4aaf87e7f79e 4696:ce3adab29aef
   157 
   157 
   158 
   158 
   159 # base commands ###############################################################
   159 # base commands ###############################################################
   160 
   160 
   161 def version_strictly_lower(a,b):
   161 def version_strictly_lower(a,b):
       
   162     from logilab.common.changelog import Version
   162     if a:
   163     if a:
   163         a = a.split('.')
   164         a = Version(a)
   164     if b:
   165     if b:
   165         b = b.split('.')
   166         b = Version(b)
   166     return a < b
   167     return a < b
   167 
   168 
   168 def max_version(a, b):
   169 def max_version(a, b):
   169     return '.'.join(max(a.split('.'), b.split('.')))
   170     from logilab.common.changelog import Version
       
   171     return str(max(Version(a), Version(b)))
   170 
   172 
   171 class ConfigurationProblem(object):
   173 class ConfigurationProblem(object):
   172     """Each cube has its own list of dependencies on other cubes/versions.
   174     """Each cube has its own list of dependencies on other cubes/versions.
   173 
   175 
   174     The ConfigurationProblem is used to record the loaded cubes, then to detect
   176     The ConfigurationProblem is used to record the loaded cubes, then to detect