Mercurial > hg > graal-jvmci-8
comparison mxtool/mx.py @ 18895:4dc7b1f66de3
mx: JavaConfig: compare compilance and version before path
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Wed, 21 Jan 2015 13:36:23 +0100 |
parents | 19d99eec8876 |
children | f5cee3a0496c |
comparison
equal
deleted
inserted
replaced
18894:31960077ea9d | 18895:4dc7b1f66de3 |
---|---|
2134 def __hash__(self): | 2134 def __hash__(self): |
2135 return hash(self.jdk) | 2135 return hash(self.jdk) |
2136 | 2136 |
2137 def __cmp__(self, other): | 2137 def __cmp__(self, other): |
2138 if isinstance(other, JavaConfig): | 2138 if isinstance(other, JavaConfig): |
2139 compilanceCmp = cmp(self.javaCompliance, other.javaCompliance) | |
2140 if compilanceCmp: | |
2141 return compilanceCmp | |
2142 versionCmp = cmp(self.version, other.version) | |
2143 if versionCmp: | |
2144 return versionCmp | |
2139 return cmp(self.jdk, other.jdk) | 2145 return cmp(self.jdk, other.jdk) |
2140 raise TypeError() | 2146 raise TypeError() |
2141 | 2147 |
2142 def format_cmd(self, args, addDefaultArgs): | 2148 def format_cmd(self, args, addDefaultArgs): |
2143 if addDefaultArgs: | 2149 if addDefaultArgs: |